
/*  A Bison parser, made from grammar.y with Bison version GNU Bison version 1.24
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	L_STRING	258
#define	L_NUMBER	259
#define	L_REAL	260
#define	L_BASIC_TYPE	261
#define	L_TYPE_MODIFIER	262
#define	L_DEFINED_NAME	263
#define	L_IDENTIFIER	264
#define	L_EFUN	265
#define	L_INC	266
#define	L_DEC	267
#define	L_ASSIGN	268
#define	L_LAND	269
#define	L_LOR	270
#define	L_LSH	271
#define	L_RSH	272
#define	L_ORDER	273
#define	L_NOT	274
#define	L_IF	275
#define	L_ELSE	276
#define	L_SWITCH	277
#define	L_CASE	278
#define	L_DEFAULT	279
#define	L_RANGE	280
#define	L_DOT_DOT_DOT	281
#define	L_WHILE	282
#define	L_DO	283
#define	L_FOR	284
#define	L_FOREACH	285
#define	L_IN	286
#define	L_BREAK	287
#define	L_CONTINUE	288
#define	L_RETURN	289
#define	L_ARROW	290
#define	L_INHERIT	291
#define	L_COLON_COLON	292
#define	L_ARRAY_OPEN	293
#define	L_MAPPING_OPEN	294
#define	L_FUNCTION_OPEN	295
#define	L_NEW_FUNCTION_OPEN	296
#define	L_SSCANF	297
#define	L_CATCH	298
#define	L_ARRAY	299
#define	L_REF	300
#define	L_PARSE_COMMAND	301
#define	L_TIME_EXPRESSION	302
#define	L_CLASS	303
#define	L_NEW	304
#define	L_PARAMETER	305
#define	LOWER_THAN_ELSE	306
#define	L_EQ	307
#define	L_NE	308

#line 3 "grammar.y"


#include "std.h"
#include "compiler.h"
#include "lex.h"
#include "scratchpad.h"

#include "lpc_incl.h"
#include "simul_efun.h"
#include "generate.h"
#include "master.h"

/* gross. Necessary? - Beek */
#ifdef WIN32
#define MSDOS
#endif
#line 18 "grammar.y.pre"
/*
 * This is the grammar definition of LPC, and its parse tree generator.
 */

/* down to one global :) 
   bits:
      SWITCH_CONTEXT     - we're inside a switch
      LOOP_CONTEXT       - we're inside a loop
      SWITCH_STRINGS     - a string case has been found
      SWITCH_NUMBERS     - a non-zero numeric case has been found
      SWITCH_RANGES      - a range has been found
      SWITCH_DEFAULT     - a default has been found
 */
int context;
int num_refs;

/*
 * bison & yacc don't prototype this in y.tab.h
 */
int yyparse PROT((void));


#line 120 "grammar.y"
typedef union

{
    POINTER_INT pointer_int;
    int number;
    float real;
    char *string;
    int type;
    struct { short num_arg; char flags; } argument;
    ident_hash_elem_t *ihe;
    parse_node_t *node;
    function_context_t *contextp;
    struct {
	parse_node_t *node;
        char num;
    } decl; /* 5 */
    struct {
	char num_local;
	char max_num_locals; 
	short context; 
	short save_current_type; 
	short save_exact_types;
    } func_block; /* 8 */
} YYSTYPE;

#ifndef YYLTYPE
typedef
  struct yyltype
{
      int timestamp;
      int first_line;
      int first_column;        
      int last_line;
      int last_column;
      char *text;
   }
            yyltype;

#define YYLTYPE yyltype
#endif

#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		481
#define	YYFLAG		-32768
#define	YYNTBASE	75

#define YYTRANSLATE(x) ((unsigned)(x) <= 308 ? yytranslate[x] : 175)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,    72,    62,    55,     2,    66,
    67,    61,    59,    69,    60,     2,    63,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    68,    65,    58,
     2,     2,    52,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    73,     2,    74,    54,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    70,    53,    71,    64,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    56,    57
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     6,     7,     8,    10,    15,    17,    19,    20,
    22,    24,    26,    28,    30,    32,    33,    34,    44,    48,
    50,    52,    54,    57,    60,    62,    66,    67,    68,    74,
    75,    83,    85,    87,    89,    92,    95,    97,    98,   100,
   103,   105,   108,   111,   115,   117,   118,   120,   123,   125,
   129,   130,   133,   136,   141,   143,   144,   146,   150,   153,
   158,   163,   165,   167,   169,   170,   171,   177,   180,   185,
   189,   193,   195,   199,   200,   203,   206,   209,   211,   213,
   215,   217,   219,   221,   223,   226,   229,   230,   237,   238,
   247,   248,   259,   261,   263,   265,   267,   271,   272,   281,
   282,   284,   286,   288,   289,   300,   303,   306,   307,   311,
   317,   320,   322,   324,   328,   332,   336,   340,   344,   348,
   352,   356,   360,   364,   368,   372,   376,   380,   384,   386,
   389,   392,   395,   397,   401,   403,   406,   410,   414,   420,
   424,   428,   432,   436,   440,   444,   448,   452,   456,   460,
   464,   468,   472,   476,   480,   484,   487,   490,   493,   496,
   499,   502,   505,   508,   510,   512,   514,   516,   518,   520,
   523,   527,   528,   530,   533,   535,   538,   540,   544,   545,
   547,   550,   552,   556,   560,   562,   564,   567,   569,   571,
   573,   575,   576,   582,   586,   593,   601,   610,   618,   624,
   631,   637,   642,   644,   648,   650,   651,   658,   662,   668,
   673,   678,   683,   685,   689,   690,   694,   702,   712,   713,
   717,   718,   722,   724,   726,   730,   734,   736,   739,   743,
   744,   748,   749,   755,   756,   762,   769,   776,   777,   783,
   784,   790,   791,   799,   800,   809,   813,   817,   819,   822,
   826,   830,   837,   838
};

static const short yyrhs[] = {    76,
     0,    76,    84,    77,     0,     0,     0,    65,     0,   102,
    36,   160,    65,     0,     5,     0,     4,     0,     0,    61,
     0,   108,     0,    65,     0,     1,     0,     8,     0,     9,
     0,     0,     0,   103,    81,    83,    85,    66,   100,    67,
    86,    82,     0,   103,   106,    65,     0,    78,     0,    92,
     0,    87,     0,   102,    68,     0,    81,    83,     0,    88,
     0,    88,    69,    89,     0,     0,     0,    90,    97,    91,
    89,    65,     0,     0,   102,    48,    83,    70,    93,    90,
    71,     0,     9,     0,     8,     0,     6,     0,    48,     8,
     0,    48,     9,     0,    95,     0,     0,    95,     0,    96,
    44,     0,    97,     0,    97,   137,     0,    98,    81,     0,
    98,    81,    94,     0,    94,     0,     0,   101,     0,   101,
    26,     0,    99,     0,   101,    69,    99,     0,     0,     7,
   102,     0,   102,   105,     0,    66,    97,    81,    67,     0,
    97,     0,     0,   107,     0,   107,    69,   106,     0,    81,
    83,     0,    81,    83,    13,   138,     0,    70,   110,   116,
    71,     0,   108,     0,   122,     0,   126,     0,     0,     0,
   110,    97,   111,   115,    65,     0,    81,    94,     0,    81,
    94,    13,   138,     0,    98,    81,    94,     0,   113,    13,
   138,     0,   112,     0,   112,    69,   115,     0,     0,   117,
   116,     0,     1,    65,     0,   136,    65,     0,   173,     0,
   118,     0,   120,     0,   130,     0,   139,     0,   109,     0,
    65,     0,    32,    65,     0,    33,    65,     0,     0,    27,
    66,   136,    67,   119,   117,     0,     0,    28,   121,   117,
    27,    66,   136,    67,    65,     0,     0,    29,    66,   129,
    65,   128,    65,   128,    67,   123,   117,     0,     8,     0,
   113,     0,     9,     0,   124,     0,   124,    69,   124,     0,
     0,    30,    66,   125,    31,   138,    67,   127,   117,     0,
     0,   136,     0,   128,     0,   114,     0,     0,    22,    66,
   136,    67,   131,    70,   110,   133,   132,    71,     0,   133,
   132,     0,   117,   132,     0,     0,    23,   134,    68,     0,
    23,   134,    25,   134,    68,     0,    24,    68,     0,   135,
     0,   160,     0,   135,    53,   135,     0,   135,    54,   135,
     0,   135,    55,   135,     0,   135,    56,   135,     0,   135,
    57,   135,     0,   135,    18,   135,     0,   135,    58,   135,
     0,   135,    16,   135,     0,   135,    17,   135,     0,   135,
    59,   135,     0,   135,    60,   135,     0,   135,    61,   135,
     0,   135,    62,   135,     0,   135,    63,   135,     0,    66,
   135,    67,     0,     4,     0,    60,     4,     0,    19,     4,
     0,    64,     4,     0,   138,     0,   136,    69,   138,     0,
    45,     0,   137,   146,     0,   146,    13,   138,     0,     1,
    13,   138,     0,   138,    52,   138,    68,   138,     0,   138,
    15,   138,     0,   138,    14,   138,     0,   138,    53,   138,
     0,   138,    54,   138,     0,   138,    55,   138,     0,   138,
    56,   138,     0,   138,    57,   138,     0,   138,    18,   138,
     0,   138,    58,   138,     0,   138,    16,   138,     0,   138,
    17,   138,     0,   138,    59,   138,     0,   138,    60,   138,
     0,   138,    61,   138,     0,   138,    62,   138,     0,   138,
    63,   138,     0,   104,   138,     0,    11,   146,     0,    12,
   146,     0,    19,   138,     0,    64,   138,     0,    60,   138,
     0,   146,    11,     0,   146,    12,     0,   148,     0,   154,
     0,   155,     0,   156,     0,    80,     0,    79,     0,    34,
    65,     0,    34,   136,    65,     0,     0,   142,     0,   142,
    69,     0,   138,     0,   138,    26,     0,   141,     0,   142,
    69,   141,     0,     0,   144,     0,   144,    69,     0,   145,
     0,   144,    69,   145,     0,   138,    68,   138,     0,   148,
     0,    41,     0,    40,   171,     0,   164,     0,     8,     0,
     9,     0,    50,     0,     0,    72,    66,   149,   136,    67,
     0,   148,    35,    83,     0,   148,    73,   136,    25,   136,
    74,     0,   148,    73,    58,   136,    25,   136,    74,     0,
   148,    73,    58,   136,    25,    58,   136,    74,     0,   148,
    73,   136,    25,    58,   136,    74,     0,   148,    73,   136,
    25,    74,     0,   148,    73,    58,   136,    25,    74,     0,
   148,    73,    58,   136,    74,     0,   148,    73,   136,    74,
     0,   159,     0,    66,   136,    67,     0,   152,     0,     0,
     6,   150,    66,   100,    67,   108,     0,   147,    68,    67,
     0,   147,    69,   142,    68,    67,     0,    40,   136,    68,
    67,     0,    39,   143,    74,    67,     0,    38,   140,    71,
    67,     0,   108,     0,    66,   136,    67,     0,     0,    43,
   153,   151,     0,    42,    66,   138,    69,   138,   158,    67,
     0,    46,    66,   138,    69,   138,    69,   138,   158,    67,
     0,     0,    47,   157,   151,     0,     0,    69,   146,   158,
     0,   161,     0,   161,     0,    66,   160,    67,     0,   160,
    59,   160,     0,     3,     0,   161,     3,     0,    83,    68,
   138,     0,     0,   163,    69,   162,     0,     0,   171,    66,
   165,   140,    67,     0,     0,    49,    66,   166,   140,    67,
     0,    49,    66,    48,     8,   163,    67,     0,    49,    66,
    48,     9,   163,    67,     0,     0,     8,    66,   167,   140,
    67,     0,     0,   172,    66,   168,   140,    67,     0,     0,
   148,    35,    83,    66,   169,   140,    67,     0,     0,    66,
    61,   136,    67,    66,   170,   140,    67,     0,    10,    37,
    83,     0,    10,    37,    49,     0,     9,     0,    37,    83,
     0,     6,    37,    83,     0,    83,    37,    83,     0,    20,
    66,   136,    67,   117,   174,     0,     0,    21,   117,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   211,   219,   225,   232,   234,   243,   325,   333,   341,   347,
   354,   363,   368,   375,   381,   384,   427,   455,   486,   493,
   494,   495,   498,   515,   529,   531,   534,   536,   541,   544,
   572,   625,   627,   644,   646,   663,   678,   680,   687,   689,
   696,   698,   705,   713,   722,   734,   741,   742,   760,   773,
   786,   792,   814,   823,   831,   833,   840,   842,   845,   872,
   927,   938,   938,   938,   940,   947,   957,   968,   981,  1015,
  1027,  1060,  1067,  1077,  1083,  1090,  1097,  1111,  1112,  1113,
  1114,  1115,  1116,  1122,  1127,  1150,  1162,  1170,  1177,  1184,
  1192,  1201,  1219,  1241,  1252,  1269,  1276,  1286,  1295,  1307,
  1313,  1316,  1323,  1331,  1340,  1366,  1374,  1381,  1389,  1398,
  1413,  1429,  1442,  1458,  1464,  1469,  1474,  1479,  1484,  1493,
  1498,  1503,  1508,  1513,  1518,  1523,  1528,  1533,  1538,  1543,
  1548,  1553,  1560,  1566,  1573,  1577,  1604,  1632,  1638,  1663,
  1670,  1677,  1703,  1708,  1732,  1755,  1770,  1815,  1853,  1858,
  1863,  2028,  2123,  2204,  2209,  2305,  2327,  2349,  2372,  2382,
  2394,  2419,  2442,  2464,  2465,  2466,  2467,  2468,  2469,  2472,
  2480,  2500,  2506,  2511,  2518,  2524,  2531,  2539,  2551,  2558,
  2563,  2570,  2582,  2600,  2608,  2717,  2718,  2726,  2728,  2771,
  2788,  2793,  2801,  2825,  2850,  2858,  2863,  2871,  2879,  2884,
  2889,  2933,  2986,  2987,  2992,  2993,  3013,  3050,  3084,  3174,
  3193,  3198,  3205,  3211,  3218,  3226,  3234,  3244,  3255,  3263,
  3270,  3278,  3292,  3301,  3303,  3308,  3315,  3317,  3324,  3334,
  3340,  3349,  3357,  3365,  3372,  3380,  3416,  3435,  3442,  3505,
  3512,  3578,  3585,  3631,  3638,  3663,  3689,  3704,  3706,  3721,
  3737,  3752,  3787,  3793
};

static const char * const yytname[] = {   "$","error","$undefined.","L_STRING",
"L_NUMBER","L_REAL","L_BASIC_TYPE","L_TYPE_MODIFIER","L_DEFINED_NAME","L_IDENTIFIER",
"L_EFUN","L_INC","L_DEC","L_ASSIGN","L_LAND","L_LOR","L_LSH","L_RSH","L_ORDER",
"L_NOT","L_IF","L_ELSE","L_SWITCH","L_CASE","L_DEFAULT","L_RANGE","L_DOT_DOT_DOT",
"L_WHILE","L_DO","L_FOR","L_FOREACH","L_IN","L_BREAK","L_CONTINUE","L_RETURN",
"L_ARROW","L_INHERIT","L_COLON_COLON","L_ARRAY_OPEN","L_MAPPING_OPEN","L_FUNCTION_OPEN",
"L_NEW_FUNCTION_OPEN","L_SSCANF","L_CATCH","L_ARRAY","L_REF","L_PARSE_COMMAND",
"L_TIME_EXPRESSION","L_CLASS","L_NEW","L_PARAMETER","LOWER_THAN_ELSE","'?'",
"'|'","'^'","'&'","L_EQ","L_NE","'<'","'+'","'-'","'*'","'%'","'/'","'~'","';'",
"'('","')'","':'","','","'{'","'}'","'$'","'['","']'","all","program","possible_semi_colon",
"inheritance","real","number","optional_star","block_or_semi","identifier","def",
"@1","@2","modifier_change","member_name","member_name_list","member_list","@3",
"type_decl","@4","new_local_name","atomic_type","opt_atomic_type","basic_type",
"arg_type","new_arg","argument","argument_list","type_modifier_list","type",
"cast","opt_basic_type","name_list","new_name","block","decl_block","local_declarations",
"@5","new_local_def","single_new_local_def","single_new_local_def_with_init",
"local_name_list","statements","statement","while","@6","do","@7","for","@8",
"foreach_var","foreach_vars","foreach","@9","for_expr","first_for_expr","switch",
"@10","switch_block","case","case_label","constant","comma_expr","ref","expr0",
"return","expr_list","expr_list_node","expr_list2","expr_list3","expr_list4",
"assoc_pair","lvalue","l_new_function_open","expr4","@11","@12","expr_or_block",
"catch","@13","sscanf","parse_command","time_expression","@14","lvalue_list",
"string","string_con1","string_con2","class_init","opt_class_init","function_call",
"@15","@16","@17","@18","@19","@20","efun_override","function_name","cond","optional_else_part",
""
};
#endif

static const short yyr1[] = {     0,
    75,    76,    76,    77,    77,    78,    79,    80,    81,    81,
    82,    82,    82,    83,    83,    85,    86,    84,    84,    84,
    84,    84,    87,    88,    89,    89,    90,    91,    90,    93,
    92,    94,    94,    95,    95,    95,    96,    96,    97,    97,
    98,    98,    99,    99,    99,   100,   100,   100,   101,   101,
   102,   102,   103,   104,   105,   105,   106,   106,   107,   107,
   108,   109,   109,   109,   110,   111,   110,   112,   112,   113,
   114,   115,   115,   116,   116,   116,   117,   117,   117,   117,
   117,   117,   117,   117,   117,   117,   119,   118,   121,   120,
   123,   122,   124,   124,   124,   125,   125,   127,   126,   128,
   128,   129,   129,   131,   130,   132,   132,   132,   133,   133,
   133,   134,   134,   135,   135,   135,   135,   135,   135,   135,
   135,   135,   135,   135,   135,   135,   135,   135,   135,   135,
   135,   135,   136,   136,   137,   138,   138,   138,   138,   138,
   138,   138,   138,   138,   138,   138,   138,   138,   138,   138,
   138,   138,   138,   138,   138,   138,   138,   138,   138,   138,
   138,   138,   138,   138,   138,   138,   138,   138,   138,   139,
   139,   140,   140,   140,   141,   141,   142,   142,   143,   143,
   143,   144,   144,   145,   146,   147,   147,   148,   148,   148,
   148,   149,   148,   148,   148,   148,   148,   148,   148,   148,
   148,   148,   148,   148,   148,   150,   148,   148,   148,   148,
   148,   148,   151,   151,   153,   152,   154,   155,   157,   156,
   158,   158,   159,   160,   160,   160,   161,   161,   162,   163,
   163,   165,   164,   166,   164,   164,   164,   167,   164,   168,
   164,   169,   164,   170,   164,   171,   171,   172,   172,   172,
   172,   173,   174,   174
};

static const short yyr2[] = {     0,
     1,     3,     0,     0,     1,     4,     1,     1,     0,     1,
     1,     1,     1,     1,     1,     0,     0,     9,     3,     1,
     1,     1,     2,     2,     1,     3,     0,     0,     5,     0,
     7,     1,     1,     1,     2,     2,     1,     0,     1,     2,
     1,     2,     2,     3,     1,     0,     1,     2,     1,     3,
     0,     2,     2,     4,     1,     0,     1,     3,     2,     4,
     4,     1,     1,     1,     0,     0,     5,     2,     4,     3,
     3,     1,     3,     0,     2,     2,     2,     1,     1,     1,
     1,     1,     1,     1,     2,     2,     0,     6,     0,     8,
     0,    10,     1,     1,     1,     1,     3,     0,     8,     0,
     1,     1,     1,     0,    10,     2,     2,     0,     3,     5,
     2,     1,     1,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     1,     2,
     2,     2,     1,     3,     1,     2,     3,     3,     5,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     2,     2,     2,     2,     2,
     2,     2,     2,     1,     1,     1,     1,     1,     1,     2,
     3,     0,     1,     2,     1,     2,     1,     3,     0,     1,
     2,     1,     3,     3,     1,     1,     2,     1,     1,     1,
     1,     0,     5,     3,     6,     7,     8,     7,     5,     6,
     5,     4,     1,     3,     1,     0,     6,     3,     5,     4,
     4,     4,     1,     3,     0,     3,     7,     9,     0,     3,
     0,     3,     1,     1,     3,     3,     1,     2,     3,     0,
     3,     0,     5,     0,     5,     6,     6,     0,     5,     0,
     5,     0,     7,     0,     8,     3,     3,     1,     2,     3,
     3,     6,     0,     2
};

static const short yydefact[] = {     3,
    51,    51,    20,     4,    22,    21,    56,     9,    52,     5,
     2,    34,     0,     0,    23,    39,     0,    55,    53,    10,
     0,     0,    57,   227,     0,     0,   224,    35,    36,     0,
    40,    14,    15,    59,    19,     9,     0,     0,     6,   228,
    30,     0,     0,     0,    58,   225,   226,    27,     0,     8,
     7,   206,   189,   190,     0,     0,     0,     0,     0,     0,
     0,     0,   186,     0,   215,   135,     0,   219,     0,   191,
     0,     0,     0,     0,   169,   168,     0,     0,     0,    60,
     0,     0,   164,   205,   165,   166,   167,   203,   223,   188,
     0,     0,    38,    59,    38,     0,     0,     0,   238,     0,
     0,   157,   185,   158,   159,   249,   175,     0,   177,   173,
     0,     0,   180,   182,     0,   133,   187,     0,     0,     0,
     0,   234,   161,   160,    34,     0,     0,     9,     0,   192,
     0,   156,   136,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   162,   163,     0,     0,     0,     0,     0,   232,   240,    33,
    32,    45,    41,     9,    49,     0,    47,    31,    28,   138,
   250,    38,     0,   247,   246,   176,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    65,   213,   216,     0,   220,
     0,     0,    35,    36,     0,     0,   204,     0,   251,   141,
   140,   149,   150,   147,     0,   142,   143,   144,   145,   146,
   148,   151,   152,   153,   154,   155,   137,   208,     0,   194,
     0,     0,     0,     0,    42,    43,    17,    48,    38,     9,
     0,     0,   212,   178,   184,   211,   183,   210,   134,     0,
     0,     0,     0,   230,   230,     0,     0,    54,     0,     0,
     0,     0,   242,     0,     0,   202,     0,     0,    44,     0,
    50,     0,    25,     0,     0,   239,   221,   214,     0,     0,
     0,     0,    89,     0,     0,     0,     0,     0,    84,    66,
    62,    83,     0,     0,    79,    80,    63,    64,    81,     0,
    82,    78,     0,     0,     0,   235,   244,   193,   139,   209,
     0,     0,   201,     0,   199,     0,   233,   241,    13,    12,
    18,    11,    24,     9,    29,   207,     0,     0,    76,     0,
     0,     0,     0,     0,    38,    85,    86,   170,     0,     9,
    61,    75,    77,     0,   236,     0,   237,     0,     0,     0,
   200,     0,     0,   195,    26,   221,   217,     0,     0,     0,
     0,     9,     0,   103,   102,     0,   101,    93,    95,    94,
    96,     0,   171,     0,    72,     0,   221,     0,   231,     0,
   243,     0,   196,   198,   222,     0,   104,    87,     0,     0,
     0,     0,    38,     0,    68,     9,    67,     0,     0,   245,
   197,   253,     0,     0,     0,    70,    71,     0,    97,     0,
     0,    73,   218,   229,     0,   252,    65,    88,     0,     0,
    98,    69,   254,    38,     0,     0,     0,     0,     0,     0,
    90,    91,    99,   129,     0,     0,     0,     0,     0,   112,
   113,   111,     0,     0,     0,     0,   131,   130,   132,     0,
     0,   109,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,   107,   105,   106,    92,
   128,     0,     0,   121,   122,   119,   114,   115,   116,   117,
   118,   120,   123,   124,   125,   126,   127,   110,     0,     0,
     0
};

static const short yydefgoto[] = {   479,
     1,    11,     3,    75,    76,   262,   311,    77,     4,    43,
   260,     5,   263,   264,    95,   230,     6,    48,   162,    16,
    17,   163,   164,   165,   166,   167,     7,     8,    78,    19,
    22,    23,   281,   282,   242,   330,   365,   360,   354,   366,
   283,   433,   285,   394,   286,   323,   287,   436,   361,   362,
   288,   417,   355,   356,   289,   393,   434,   435,   429,   430,
   290,    79,   116,   291,   108,   109,   110,   112,   113,   114,
    81,    82,    83,   198,    98,   188,    84,   119,    85,    86,
    87,   121,   318,    88,    37,    89,   369,   294,    90,   223,
   192,   173,   224,   301,   338,    91,    92,   292,   406
};

static const short yypact[] = {-32768,
    50,    53,-32768,   -16,-32768,-32768,    90,    11,-32768,-32768,
-32768,-32768,    48,    30,-32768,    84,   115,-32768,-32768,-32768,
   141,    75,   121,-32768,    48,    66,   220,   182,   190,   211,
-32768,-32768,-32768,    27,-32768,    11,    76,    48,-32768,-32768,
-32768,  1619,   173,   141,-32768,-32768,-32768,-32768,   287,-32768,
-32768,   266,     9,    10,   276,   296,   296,  1619,   141,  1127,
   485,  1619,-32768,   272,-32768,-32768,   277,-32768,   284,-32768,
  1619,  1619,   915,   293,-32768,-32768,   324,  1619,   296,  1023,
   316,   132,    42,-32768,-32768,-32768,-32768,-32768,   220,-32768,
   297,   301,   124,   358,    16,  1619,   141,   307,-32768,    35,
  1199,-32768,     1,-32768,-32768,-32768,   954,   310,-32768,   317,
   381,   313,   319,-32768,   174,  1023,   297,  1619,     3,  1619,
     3,   341,-32768,-32768,    28,   357,  1619,    11,   104,-32768,
   141,-32768,-32768,  1619,  1619,  1619,  1619,  1619,  1619,  1619,
  1619,  1619,  1619,  1619,  1619,  1619,  1619,  1619,  1619,  1619,
-32768,-32768,  1619,   323,  1619,   141,  1269,-32768,-32768,-32768,
-32768,-32768,   346,    11,-32768,   325,     2,-32768,-32768,  1023,
-32768,   124,  1339,-32768,-32768,-32768,   326,  1055,  1619,   327,
   557,   334,  1619,  1656,  1619,-32768,-32768,-32768,  1678,-32768,
   361,  1339,-32768,-32768,   114,   335,-32768,  1619,-32768,  1166,
  1094,   171,   171,   224,   525,   261,  1374,   136,  1100,  1100,
   224,   246,   246,-32768,-32768,-32768,  1023,-32768,   311,   337,
  1619,    94,  1339,  1339,-32768,   375,-32768,-32768,   196,    11,
   340,   343,-32768,-32768,  1023,-32768,-32768,-32768,  1023,  1619,
   169,   629,  1619,-32768,-32768,   344,   338,-32768,   181,  1619,
   345,  1619,-32768,    96,   216,-32768,   353,   359,-32768,    15,
-32768,   141,   339,   348,   360,-32768,  1706,-32768,    14,   365,
   379,   380,-32768,   382,   391,   362,   396,  1409,-32768,-32768,
-32768,-32768,   376,   773,-32768,-32768,-32768,-32768,-32768,   147,
-32768,-32768,  1728,   203,   206,-32768,-32768,-32768,  1023,-32768,
  1339,   413,-32768,  1619,-32768,    88,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,    11,-32768,-32768,   296,   397,-32768,  1619,
  1619,  1619,   845,   985,   201,-32768,-32768,-32768,   149,    11,
-32768,-32768,-32768,  1619,-32768,   141,-32768,  1339,   398,  1619,
-32768,    95,   105,-32768,-32768,   403,-32768,   222,   226,   229,
   439,    11,   454,-32768,-32768,   409,   406,-32768,-32768,-32768,
   407,   447,-32768,   375,   411,   416,  1706,   414,-32768,   417,
-32768,   111,-32768,-32768,-32768,   845,-32768,-32768,   426,   375,
  1619,  1479,   201,  1619,   470,    11,-32768,   431,  1619,-32768,
-32768,   478,   430,   845,  1619,-32768,  1023,   436,-32768,   883,
  1619,-32768,-32768,  1023,   845,-32768,-32768,-32768,   282,  1549,
-32768,  1023,-32768,   223,   437,   449,   845,    63,   435,   701,
-32768,-32768,-32768,-32768,   513,   514,   516,    63,    20,  1236,
   462,-32768,   701,   458,   701,   845,-32768,-32768,-32768,   452,
    63,-32768,   118,   118,   118,   118,   118,   118,   118,   118,
   118,   118,   118,   118,   118,   118,-32768,-32768,-32768,-32768,
-32768,   465,   118,   294,   294,   315,  1305,  1444,  1514,  1172,
  1172,   315,   279,   279,-32768,-32768,-32768,-32768,   536,   537,
-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,-32768,-32768,-32768,    -4,-32768,   -11,-32768,-32768,
-32768,-32768,-32768,   230,-32768,-32768,-32768,-32768,  -213,-32768,
-32768,    -5,  -305,   309,   374,-32768,   545,-32768,-32768,-32768,
   512,-32768,  -104,-32768,   143,-32768,-32768,   228,-32768,   167,
   270,  -228,-32768,-32768,-32768,-32768,-32768,-32768,   172,-32768,
-32768,-32768,  -340,-32768,-32768,-32768,   -75,   142,   123,  1364,
   -10,   408,   -37,-32768,  -162,  -160,   415,-32768,-32768,   392,
   -50,-32768,   -48,-32768,-32768,   451,-32768,-32768,-32768,-32768,
-32768,-32768,  -309,-32768,   -12,   -13,-32768,   329,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   527,-32768,-32768,-32768
};


#define	YYLAST		1827


static const short yytable[] = {    27,
    26,    18,    30,    21,    80,   102,   104,   103,   103,    34,
   232,    27,   259,   284,   187,   309,   187,   234,   352,   352,
   105,    12,   107,   111,    27,    47,    96,   228,   133,   246,
   103,    44,    94,   123,   124,   156,   375,    28,    29,    42,
   132,   398,    32,    33,   441,   -14,   -15,   106,    10,    -1,
    24,   115,  -185,  -185,  -185,   284,     2,   388,   170,     2,
   257,   258,   129,   126,    97,    24,   424,   128,   185,   416,
   229,    20,   186,   157,    99,  -248,   156,   352,   319,   310,
   184,   425,   189,   174,   186,   171,   168,   442,   175,   169,
   129,   234,   -16,  -206,   351,    12,   200,   201,   202,   203,
   204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
   214,   215,   216,    25,   157,   217,   195,   107,   255,   199,
   302,   424,   426,   196,    38,    13,   427,   -37,   428,    12,
    39,   160,   161,   -38,    38,   107,   425,    14,   339,    35,
   107,   235,    46,   111,   220,   239,   222,   392,    32,    33,
   385,   136,   137,   138,   107,   312,   183,    15,    31,   226,
   316,   344,   183,   183,   183,   408,   396,   256,   373,   303,
   197,   126,   183,   183,   241,   370,   413,   426,   374,   183,
   247,   427,   183,   463,   391,   107,   107,   249,   423,    36,
   -46,   143,   144,   145,   146,   147,   148,   149,   150,   154,
   155,    12,   267,   160,   161,   293,    12,   460,   358,   359,
   254,   333,   299,   363,   107,   183,    49,   183,    24,    50,
    51,    52,    40,    53,    54,    55,    56,    57,    12,   146,
   147,   148,   149,   150,    58,   268,   280,   183,    93,   136,
   137,   182,   183,   126,   306,   418,   419,   298,   126,   183,
   313,   -14,    59,    60,    61,    62,    63,    64,    65,   -15,
    66,    67,    68,   107,    69,    70,   346,   329,   103,   335,
   126,   336,   337,   304,   336,    71,   136,   137,   138,    72,
    41,    73,   146,   147,   148,   149,   150,    74,   376,   305,
   183,   342,   377,   343,   183,   378,   367,   183,    24,    96,
   107,    52,    97,    53,    54,    55,   148,   149,   150,   348,
   349,   350,   100,   357,   141,   142,   143,   144,   145,   146,
   147,   148,   149,   150,   368,   364,   151,   152,   153,   372,
   443,   444,    59,    60,    61,    62,    63,   118,    65,   454,
   455,   456,   120,   397,    69,    70,   400,   380,   415,   122,
   183,   404,   452,   453,   454,   455,   456,   457,   130,   459,
   131,   101,   158,   412,   193,   194,   159,    74,   244,   245,
    42,   357,   172,   452,   453,   454,   455,   456,   251,   252,
   177,   364,   160,   161,   409,   178,   180,   181,   191,   218,
    66,   227,   233,   236,   134,   135,   136,   137,   138,   357,
   238,   248,   253,   297,    27,   431,   265,   314,   280,   266,
   296,   300,   315,    49,    27,    24,    50,    51,    52,   307,
    53,    54,    55,    56,    57,   308,   326,    27,   431,   186,
   320,    58,   139,   140,   141,   142,   143,   144,   145,   146,
   147,   148,   149,   150,   321,   322,   331,   324,   179,    59,
    60,    61,    62,    63,    64,    65,   325,    66,    67,    68,
   327,    69,    70,   347,   371,   379,   381,   443,   444,   445,
   340,   317,    71,   382,   183,   383,    72,   384,    73,   386,
   387,   389,   401,   390,    74,    49,   341,    24,    50,    51,
    52,   395,    53,    54,    55,    56,    57,   403,   405,   407,
   410,   421,   432,    58,   446,   447,   448,   449,   450,   451,
   452,   453,   454,   455,   456,   422,   437,   438,   461,   439,
    38,    59,    60,    61,    62,    63,    64,    65,   458,    66,
    67,    68,   478,    69,    70,   480,   481,   261,   134,   135,
   136,   137,   138,   345,    71,   231,     9,    45,    72,   414,
    73,   353,   402,   332,   399,   420,    74,    49,  -179,    24,
    50,    51,    52,   462,    53,    54,    55,    56,    57,   219,
   225,   190,   237,   295,     0,    58,   139,   140,   141,   142,
   143,   144,   145,   146,   147,   148,   149,   150,   117,     0,
     0,     0,   250,    59,    60,    61,    62,    63,    64,    65,
     0,    66,    67,    68,     0,    69,    70,     0,     0,     0,
     0,     0,     0,     0,     0,     0,    71,     0,     0,     0,
    72,     0,    73,     0,     0,     0,     0,     0,    74,   269,
  -181,    24,    50,    51,   125,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   270,     0,
   271,     0,     0,     0,     0,   272,   273,   274,   275,     0,
   276,   277,   278,     0,     0,    59,    60,    61,    62,    63,
    64,    65,   -38,    66,    67,    68,   126,    69,    70,     0,
     0,     0,     0,     0,     0,     0,     0,     0,    71,     0,
     0,     0,    72,   279,    73,     0,     0,     0,   186,   -74,
    74,    49,     0,    24,    50,    51,    52,     0,    53,    54,
    55,    56,    57,     0,     0,     0,     0,     0,     0,    58,
   270,     0,   271,   418,   419,     0,     0,   272,   273,   274,
   275,     0,   276,   277,   278,     0,     0,    59,    60,    61,
    62,    63,    64,    65,     0,    66,    67,    68,     0,    69,
    70,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    71,     0,     0,     0,    72,   279,    73,     0,     0,     0,
   186,  -108,    74,   269,     0,    24,    50,    51,    52,     0,
    53,    54,    55,    56,    57,     0,     0,     0,     0,     0,
     0,    58,   270,     0,   271,     0,     0,     0,     0,   272,
   273,   274,   275,     0,   276,   277,   278,     0,     0,    59,
    60,    61,    62,    63,    64,    65,     0,    66,    67,    68,
     0,    69,    70,     0,     0,     0,     0,     0,     0,     0,
     0,     0,    71,     0,     0,     0,    72,   279,    73,     0,
     0,     0,   186,   -74,    74,    49,     0,    24,    50,    51,
    52,     0,    53,    54,    55,    56,    57,     0,     0,     0,
     0,     0,     0,    58,   270,     0,   271,     0,     0,     0,
     0,   272,   273,   274,   275,     0,   276,   277,   278,     0,
     0,    59,    60,    61,    62,    63,    64,    65,     0,    66,
    67,    68,     0,    69,    70,     0,   134,   135,   136,   137,
   138,     0,     0,     0,    71,     0,     0,     0,    72,   279,
    73,     0,     0,     0,   186,    49,    74,    24,    50,    51,
   125,     0,    53,    54,    55,    56,    57,     0,     0,     0,
     0,     0,     0,    58,   139,   140,   141,   142,   143,   144,
   145,   146,   147,   148,   149,   150,     0,     0,     0,   411,
     0,    59,    60,    61,    62,    63,    64,    65,   -38,    66,
    67,    68,   126,    69,    70,     0,     0,   134,   135,   136,
   137,   138,     0,     0,    71,   127,     0,     0,    72,   176,
    73,     0,     0,     0,     0,    49,    74,    24,    50,    51,
   125,     0,    53,    54,    55,    56,    57,     0,     0,     0,
     0,     0,     0,    58,     0,   139,   140,   141,   142,   143,
   144,   145,   146,   147,   148,   149,   150,     0,     0,     0,
     0,    59,    60,    61,    62,    63,    64,    65,   -38,    66,
    67,    68,   126,    69,    70,     0,   134,   135,   136,   137,
   138,     0,     0,     0,    71,     0,     0,     0,    72,  -100,
    73,     0,     0,     0,     0,    49,    74,    24,    50,    51,
    52,     0,    53,    54,    55,    56,    57,     0,     0,     0,
     0,     0,     0,    58,   139,   140,   141,   142,   143,   144,
   145,   146,   147,   148,   149,   150,     0,     0,     0,     0,
     0,    59,    60,    61,    62,    63,    64,    65,     0,    66,
    67,    68,     0,    69,    70,     0,     0,   134,     0,   136,
   137,   138,     0,     0,    71,   136,   137,   138,    72,     0,
    73,  -174,     0,     0,     0,  -174,    74,    49,     0,    24,
    50,    51,    52,     0,    53,    54,    55,    56,    57,     0,
     0,     0,     0,     0,     0,    58,   140,   141,   142,   143,
   144,   145,   146,   147,   148,   149,   150,   145,   146,   147,
   148,   149,   150,    59,    60,    61,    62,    63,    64,    65,
     0,    66,    67,    68,     0,    69,    70,     0,     0,     0,
     0,   136,   137,   138,     0,     0,    71,   443,   444,   445,
    72,     0,    73,     0,     0,     0,     0,  -172,    74,    49,
     0,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   140,   141,
   142,   143,   144,   145,   146,   147,   148,   149,   150,   451,
   452,   453,   454,   455,   456,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,     0,
     0,   443,   444,   445,     0,     0,     0,     0,    71,   127,
     0,     0,    72,     0,    73,     0,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   446,   447,
   448,   449,   450,   451,   452,   453,   454,   455,   456,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,     0,
   443,   444,   445,     0,     0,     0,   221,     0,    71,     0,
     0,     0,    72,     0,    73,     0,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   447,   448,
   449,   450,   451,   452,   453,   454,   455,   456,     0,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,   136,
   137,   138,     0,     0,     0,     0,     0,     0,    71,     0,
     0,     0,    72,     0,    73,  -172,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   142,   143,
   144,   145,   146,   147,   148,   149,   150,     0,     0,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,   443,
   444,   445,     0,     0,     0,     0,     0,     0,    71,     0,
     0,     0,    72,   328,    73,     0,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,   448,   449,
   450,   451,   452,   453,   454,   455,   456,     0,     0,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,   443,
   444,   445,     0,     0,     0,     0,     0,     0,    71,     0,
     0,     0,    72,  -100,    73,     0,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,     0,   449,
   450,   451,   452,   453,   454,   455,   456,     0,     0,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,     0,
     0,     0,     0,     0,     0,     0,     0,     0,    71,     0,
     0,     0,    72,     0,    73,  -100,     0,     0,     0,    49,
    74,    24,    50,    51,    52,     0,    53,    54,    55,    56,
    57,     0,     0,     0,     0,     0,     0,    58,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    59,    60,    61,    62,    63,
    64,    65,     0,    66,    67,    68,     0,    69,    70,   134,
   135,   136,   137,   138,     0,     0,     0,     0,    71,     0,
     0,     0,    72,     0,    73,     0,     0,     0,     0,     0,
    74,   134,   135,   136,   137,   138,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,   139,   140,   141,
   142,   143,   144,   145,   146,   147,   148,   149,   150,   134,
   135,   136,   137,   138,   240,     0,     0,     0,     0,   139,
   140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
   150,   134,   135,   136,   137,   138,   243,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,   139,   140,   141,
   142,   143,   144,   145,   146,   147,   148,   149,   150,     0,
     0,     0,     0,     0,   317,     0,     0,     0,     0,   139,
   140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
   150,   440,     0,     0,     0,     0,   334,     0,     0,     0,
     0,     0,     0,     0,     0,     0,   464,   465,   466,   467,
   468,   469,   470,   471,   472,   473,   474,   475,   476,   477,
     0,     0,     0,     0,     0,     0,   440
};

static const short yycheck[] = {    13,
    13,     7,    14,     8,    42,    56,    57,    56,    57,    21,
   173,    25,   226,   242,   119,     1,   121,   178,   324,   325,
    58,     6,    60,    61,    38,    38,    13,    26,    79,   192,
    79,    36,    44,    71,    72,    35,   346,     8,     9,    13,
    78,   382,     8,     9,    25,    37,    37,    59,    65,     0,
     3,    62,    11,    12,    13,   284,     7,   367,    96,     7,
   223,   224,    73,    48,    37,     3,     4,    73,    66,   410,
    69,    61,    70,    73,    66,    66,    35,   383,    65,    65,
   118,    19,   120,    49,    70,    97,    71,    68,   100,    95,
   101,   252,    66,    66,   323,     6,   134,   135,   136,   137,
   138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
   148,   149,   150,    66,    73,   153,   127,   155,    25,   131,
    25,     4,    60,   128,    59,    36,    64,    44,    66,     6,
    65,     8,     9,    44,    59,   173,    19,    48,   301,    65,
   178,   179,    67,   181,   156,   183,   157,   376,     8,     9,
   364,    16,    17,    18,   192,   260,    69,    68,    44,   164,
   265,    74,    69,    69,    69,   394,   380,    74,    74,    74,
    67,    48,    69,    69,   185,   338,   405,    60,    74,    69,
    67,    64,    69,    66,    74,   223,   224,   198,   417,    69,
    67,    56,    57,    58,    59,    60,    61,    62,    63,    68,
    69,     6,   240,     8,     9,   243,     6,   436,     8,     9,
   221,    65,   250,    65,   252,    69,     1,    69,     3,     4,
     5,     6,     3,     8,     9,    10,    11,    12,     6,    59,
    60,    61,    62,    63,    19,    67,   242,    69,    66,    16,
    17,    68,    69,    48,   255,    23,    24,    67,    48,    69,
   262,    70,    37,    38,    39,    40,    41,    42,    43,    70,
    45,    46,    47,   301,    49,    50,   317,   278,   317,    67,
    48,    69,    67,    58,    69,    60,    16,    17,    18,    64,
    70,    66,    59,    60,    61,    62,    63,    72,    67,    74,
    69,   302,    67,   304,    69,    67,   334,    69,     3,    13,
   338,     6,    37,     8,     9,    10,    61,    62,    63,   320,
   321,   322,    37,   324,    54,    55,    56,    57,    58,    59,
    60,    61,    62,    63,   336,   330,    11,    12,    13,   340,
    16,    17,    37,    38,    39,    40,    41,    66,    43,    61,
    62,    63,    66,   381,    49,    50,   384,   352,    67,    66,
    69,   389,    59,    60,    61,    62,    63,   433,    66,   435,
    37,    66,    66,   401,     8,     9,    66,    72,     8,     9,
    13,   382,    66,    59,    60,    61,    62,    63,    68,    69,
    71,   386,     8,     9,   395,    69,    74,    69,    48,    67,
    45,    67,    67,    67,    14,    15,    16,    17,    18,   410,
    67,    67,    66,    66,   418,   418,    67,    69,   414,    67,
    67,    67,    65,     1,   428,     3,     4,     5,     6,    67,
     8,     9,    10,    11,    12,    67,    65,   441,   441,    70,
    66,    19,    52,    53,    54,    55,    56,    57,    58,    59,
    60,    61,    62,    63,    66,    66,    71,    66,    68,    37,
    38,    39,    40,    41,    42,    43,    66,    45,    46,    47,
    65,    49,    50,    67,    67,    27,    13,    16,    17,    18,
    58,    69,    60,    65,    69,    69,    64,    31,    66,    69,
    65,    68,    13,    67,    72,     1,    74,     3,     4,     5,
     6,    66,     8,     9,    10,    11,    12,    67,    21,    70,
    65,    65,    68,    19,    53,    54,    55,    56,    57,    58,
    59,    60,    61,    62,    63,    67,     4,     4,    67,     4,
    59,    37,    38,    39,    40,    41,    42,    43,    71,    45,
    46,    47,    68,    49,    50,     0,     0,   229,    14,    15,
    16,    17,    18,   314,    60,   172,     2,    36,    64,   407,
    66,   324,   386,   284,   383,   414,    72,     1,    74,     3,
     4,     5,     6,   441,     8,     9,    10,    11,    12,   155,
   163,   121,   181,   245,    -1,    19,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    62,    -1,
    -1,    -1,    68,    37,    38,    39,    40,    41,    42,    43,
    -1,    45,    46,    47,    -1,    49,    50,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,    -1,    -1,
    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,    72,     1,
    74,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    20,    -1,
    22,    -1,    -1,    -1,    -1,    27,    28,    29,    30,    -1,
    32,    33,    34,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    44,    45,    46,    47,    48,    49,    50,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,
    72,     1,    -1,     3,     4,     5,     6,    -1,     8,     9,
    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,
    20,    -1,    22,    23,    24,    -1,    -1,    27,    28,    29,
    30,    -1,    32,    33,    34,    -1,    -1,    37,    38,    39,
    40,    41,    42,    43,    -1,    45,    46,    47,    -1,    49,
    50,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    60,    -1,    -1,    -1,    64,    65,    66,    -1,    -1,    -1,
    70,    71,    72,     1,    -1,     3,     4,     5,     6,    -1,
     8,     9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,
    -1,    19,    20,    -1,    22,    -1,    -1,    -1,    -1,    27,
    28,    29,    30,    -1,    32,    33,    34,    -1,    -1,    37,
    38,    39,    40,    41,    42,    43,    -1,    45,    46,    47,
    -1,    49,    50,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    60,    -1,    -1,    -1,    64,    65,    66,    -1,
    -1,    -1,    70,    71,    72,     1,    -1,     3,     4,     5,
     6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
    -1,    -1,    -1,    19,    20,    -1,    22,    -1,    -1,    -1,
    -1,    27,    28,    29,    30,    -1,    32,    33,    34,    -1,
    -1,    37,    38,    39,    40,    41,    42,    43,    -1,    45,
    46,    47,    -1,    49,    50,    -1,    14,    15,    16,    17,
    18,    -1,    -1,    -1,    60,    -1,    -1,    -1,    64,    65,
    66,    -1,    -1,    -1,    70,     1,    72,     3,     4,     5,
     6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
    -1,    -1,    -1,    19,    52,    53,    54,    55,    56,    57,
    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,    67,
    -1,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    -1,    -1,    14,    15,    16,
    17,    18,    -1,    -1,    60,    61,    -1,    -1,    64,    26,
    66,    -1,    -1,    -1,    -1,     1,    72,     3,     4,     5,
     6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
    -1,    -1,    -1,    19,    -1,    52,    53,    54,    55,    56,
    57,    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,
    -1,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    -1,    14,    15,    16,    17,
    18,    -1,    -1,    -1,    60,    -1,    -1,    -1,    64,    65,
    66,    -1,    -1,    -1,    -1,     1,    72,     3,     4,     5,
     6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
    -1,    -1,    -1,    19,    52,    53,    54,    55,    56,    57,
    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,    -1,
    -1,    37,    38,    39,    40,    41,    42,    43,    -1,    45,
    46,    47,    -1,    49,    50,    -1,    -1,    14,    -1,    16,
    17,    18,    -1,    -1,    60,    16,    17,    18,    64,    -1,
    66,    67,    -1,    -1,    -1,    71,    72,     1,    -1,     3,
     4,     5,     6,    -1,     8,     9,    10,    11,    12,    -1,
    -1,    -1,    -1,    -1,    -1,    19,    53,    54,    55,    56,
    57,    58,    59,    60,    61,    62,    63,    58,    59,    60,
    61,    62,    63,    37,    38,    39,    40,    41,    42,    43,
    -1,    45,    46,    47,    -1,    49,    50,    -1,    -1,    -1,
    -1,    16,    17,    18,    -1,    -1,    60,    16,    17,    18,
    64,    -1,    66,    -1,    -1,    -1,    -1,    71,    72,     1,
    -1,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    53,    54,
    55,    56,    57,    58,    59,    60,    61,    62,    63,    58,
    59,    60,    61,    62,    63,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    -1,
    -1,    16,    17,    18,    -1,    -1,    -1,    -1,    60,    61,
    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    53,    54,
    55,    56,    57,    58,    59,    60,    61,    62,    63,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    -1,
    16,    17,    18,    -1,    -1,    -1,    58,    -1,    60,    -1,
    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    16,
    17,    18,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    -1,    66,    67,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    55,    56,
    57,    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    16,
    17,    18,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    55,    56,
    57,    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    16,
    17,    18,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    -1,    56,
    57,    58,    59,    60,    61,    62,    63,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    -1,    66,    67,    -1,    -1,    -1,     1,
    72,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
    12,    -1,    -1,    -1,    -1,    -1,    -1,    19,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    37,    38,    39,    40,    41,
    42,    43,    -1,    45,    46,    47,    -1,    49,    50,    14,
    15,    16,    17,    18,    -1,    -1,    -1,    -1,    60,    -1,
    -1,    -1,    64,    -1,    66,    -1,    -1,    -1,    -1,    -1,
    72,    14,    15,    16,    17,    18,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    53,    54,
    55,    56,    57,    58,    59,    60,    61,    62,    63,    14,
    15,    16,    17,    18,    69,    -1,    -1,    -1,    -1,    52,
    53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
    63,    14,    15,    16,    17,    18,    69,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    53,    54,
    55,    56,    57,    58,    59,    60,    61,    62,    63,    -1,
    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    -1,    52,
    53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
    63,   428,    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,   443,   444,   445,   446,
   447,   448,   449,   450,   451,   452,   453,   454,   455,   456,
    -1,    -1,    -1,    -1,    -1,    -1,   463
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (from, to, count)
     char *from;
     char *to;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 192 "bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#else
#define YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#endif

int
yyparse(YYPARSE_PARAM)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 213 "grammar.y"
{
#line 229 "grammar.y.pre"
	    comp_trees[TREE_MAIN] = yyval.node;
	;
    break;}
case 2:
#line 221 "grammar.y"
{
#line 236 "grammar.y.pre"
	    CREATE_TWO_VALUES(yyval.node, 0, yyvsp[-2].node, yyvsp[-1].node);
	;
    break;}
case 3:
#line 226 "grammar.y"
{
#line 240 "grammar.y.pre"
	    yyval.node = 0;
	;
    break;}
case 5:
#line 235 "grammar.y"
{
#line 248 "grammar.y.pre"

		yywarn("Extra ';'. Ignored.");
	    ;
    break;}
case 6:
#line 245 "grammar.y"
{
#line 257 "grammar.y.pre"
		object_t *ob;
		inherit_t inherit;
		int initializer;
		int acc_mod;
		
		yyvsp[-3].type |= global_modifiers;

                acc_mod = (yyvsp[-3].type & DECL_ACCESS) & ~global_modifiers;
		if (acc_mod & (acc_mod - 1)) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Multiple access modifiers (");
		    p = get_type_modifiers(p, end, yyvsp[-3].type);
		    p = strput(p, end, ") for inheritance");
		    yyerror(buf);
		}	       
		
		if (!(yyvsp[-3].type & DECL_ACCESS)) yyvsp[-3].type |= DECL_PUBLIC;
		
		if (var_defined)
		    yyerror("Illegal to inherit after defining global variables.");
		ob = find_object2(yyvsp[-1].string);
		if (ob == 0) {
		    inherit_file = alloc_cstring(yyvsp[-1].string, "inherit");
		    /* Return back to load_object() */
		    YYACCEPT;
		}
		scratch_free(yyvsp[-1].string);
		inherit.prog = ob->prog;

		if (mem_block[A_INHERITS].current_size){
		    inherit_t *prev_inherit = INHERIT(NUM_INHERITS - 1);
		    
		    inherit.function_index_offset 
			= prev_inherit->function_index_offset
			+ prev_inherit->prog->num_functions_defined
			+ prev_inherit->prog->last_inherited;
		    if (prev_inherit->prog->num_functions_defined &&
			prev_inherit->prog->function_table[prev_inherit->prog->num_functions_defined - 1].name[0] == '#')
			inherit.function_index_offset--;
		} else inherit.function_index_offset = 0;
		
		inherit.variable_index_offset =
		    mem_block[A_VAR_TEMP].current_size /
		    sizeof (variable_t);
		inherit.type_mod = yyvsp[-3].type;
		add_to_mem_block(A_INHERITS, (char *)&inherit, sizeof inherit);

		/* The following has to come before copy_vars - Sym */
		copy_structures(ob->prog);
		copy_variables(ob->prog, yyvsp[-3].type);
		initializer = copy_functions(ob->prog, yyvsp[-3].type);
		if (initializer >= 0) {
		    parse_node_t *node, *newnode;
		    /* initializer is an index into the object we're
		       inheriting's function table; this finds the
		       appropriate entry in our table and generates
		       a call to it */
		    node = new_node_no_line();
		    node->kind = NODE_CALL_2;
		    node->r.expr = 0;
		    node->v.number = F_CALL_INHERITED;
		    node->l.number = initializer | ((NUM_INHERITS - 1) << 16);
		    node->type = TYPE_ANY;
		    
		    /* The following illustrates a distinction between */
		    /* macros and funcs...newnode is needed here - Sym */
		    newnode = comp_trees[TREE_INIT];
		    CREATE_TWO_VALUES(comp_trees[TREE_INIT],0, newnode, node);
		    comp_trees[TREE_INIT] = pop_value(comp_trees[TREE_INIT]);
		    
		} 
		yyval.node = 0;
	    ;
    break;}
case 7:
#line 327 "grammar.y"
{
#line 342 "grammar.y.pre"
		CREATE_REAL(yyval.node, yyvsp[0].real);
	    ;
    break;}
case 8:
#line 335 "grammar.y"
{
#line 349 "grammar.y.pre"
		CREATE_NUMBER(yyval.node, yyvsp[0].number);
	    ;
    break;}
case 9:
#line 343 "grammar.y"
{
#line 356 "grammar.y.pre"
		yyval.type = 0;
	    ;
    break;}
case 10:
#line 348 "grammar.y"
{
#line 360 "grammar.y.pre"
		yyval.type = TYPE_MOD_ARRAY;
	    ;
    break;}
case 11:
#line 356 "grammar.y"
{
#line 367 "grammar.y.pre"
		yyval.node = yyvsp[0].decl.node;
		if (!yyval.node) {
		    CREATE_RETURN(yyval.node, 0);
		}
            ;
    break;}
case 12:
#line 364 "grammar.y"
{
#line 374 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 13:
#line 369 "grammar.y"
{
#line 378 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 14:
#line 377 "grammar.y"
{
#line 385 "grammar.y.pre"
		yyval.string = scratch_copy(yyvsp[0].ihe->name);
	    ;
    break;}
case 16:
#line 386 "grammar.y"
{
#line 393 "grammar.y.pre"
		int flags;
                int acc_mod;
		
		flags = (yyvsp[-2].type >> 16);
		
		flags |= global_modifiers;

                acc_mod = (flags & DECL_ACCESS) & ~global_modifiers;
		if (acc_mod & (acc_mod - 1)) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Multiple access modifiers (");
		    p = get_type_modifiers(p, end, flags);
		    p = strput(p, end, ") for function");
		    yyerror(buf);
		}	 

		if (!(flags & DECL_ACCESS)) flags |= DECL_PUBLIC;
		if (flags & DECL_NOSAVE) {
		    yywarn("Illegal to declare nosave function.");
		    flags &= ~DECL_NOSAVE;
		}
                yyvsp[-2].type = (flags << 16) | (yyvsp[-2].type & 0xffff);
		/* Handle type checking here so we know whether to typecheck
		   'argument' */
		if (yyvsp[-2].type & 0xffff) {
		    exact_types = (yyvsp[-2].type& 0xffff) | yyvsp[-1].type;
		} else {
		    if (pragmas & PRAGMA_STRICT_TYPES) {
			if (strcmp(yyvsp[0].string, "create") != 0)
			    yyerror("\"#pragma strict_types\" requires type of function");
			else
			    exact_types = TYPE_VOID; /* default for create() */
		    } else
			exact_types = 0;
		}
	    ;
    break;}
case 17:
#line 428 "grammar.y"
{
#line 444 "grammar.y.pre"
		char *p = yyvsp[-4].string;
		yyvsp[-4].string = make_shared_string(yyvsp[-4].string);
		scratch_free(p);

		/* If we had nested functions, we would need to check */
		/* here if we have enough space for locals */
		
		/*
		 * Define a prototype. If it is a real function, then the
		 * prototype will be replaced below.
		 */

		yyval.number = FUNC_PROTOTYPE;
		if (yyvsp[-1].argument.flags & ARG_IS_VARARGS) {
		    yyval.number |= (FUNC_TRUE_VARARGS | FUNC_VARARGS);
		}
		yyval.number |= (yyvsp[-6].type >> 16);

		define_new_function(yyvsp[-4].string, yyvsp[-1].argument.num_arg, 0, yyval.number, (yyvsp[-6].type & 0xffff)| yyvsp[-5].type);
		/* This is safe since it is guaranteed to be in the
		   function table, so it can't be dangling */
		free_string(yyvsp[-4].string); 
		context = 0;
	    ;
    break;}
case 18:
#line 455 "grammar.y"
{
#line 470 "grammar.y.pre"
		/* Either a prototype or a block */
		if (yyvsp[0].node) {
		    int fun;

		    yyvsp[-1].number &= ~FUNC_PROTOTYPE;
		    if (yyvsp[0].node->kind != NODE_RETURN &&
			(yyvsp[0].node->kind != NODE_TWO_VALUES
			 || yyvsp[0].node->r.expr->kind != NODE_RETURN)) {
			parse_node_t *replacement;
			CREATE_STATEMENTS(replacement, yyvsp[0].node, 0);
			CREATE_RETURN(replacement->r.expr, 0);
			yyvsp[0].node = replacement;
		    }

		    fun = define_new_function(yyvsp[-6].string, yyvsp[-3].argument.num_arg, 
					      max_num_locals - yyvsp[-3].argument.num_arg,
					      yyvsp[-1].number, (yyvsp[-8].type & 0xffff) | yyvsp[-7].type);
		    if (fun != -1) {
			yyval.node = new_node_no_line();
			yyval.node->kind = NODE_FUNCTION;
			yyval.node->v.number = fun;
			yyval.node->l.number = max_num_locals;
			yyval.node->r.expr = yyvsp[0].node;
		    } else 
			yyval.node = 0;
		} else
		    yyval.node = 0;
		free_all_local_names(!!yyvsp[0].node);
	    ;
    break;}
case 19:
#line 487 "grammar.y"
{
#line 501 "grammar.y.pre"
		if (!(yyvsp[-2].type & ~(DECL_MODS)) && (pragmas & PRAGMA_STRICT_TYPES))
		    yyerror("Missing type for global variable declaration");
		yyval.node = 0;
	    ;
    break;}
case 23:
#line 499 "grammar.y"
{
#line 512 "grammar.y.pre"
		if (!yyvsp[-1].type) 
		    yyerror("modifier list may not be empty.");
		
		if (yyvsp[-1].type & FUNC_VARARGS) {
		    yyerror("Illegal modifier 'varargs' in global modifier list.");
		    yyvsp[-1].type &= ~FUNC_VARARGS;
		}

		if (!(yyvsp[-1].type & DECL_ACCESS)) yyvsp[-1].type |= DECL_PUBLIC;
		global_modifiers = yyvsp[-1].type;
		yyval.node = 0;
	    ;
    break;}
case 24:
#line 517 "grammar.y"
{
#line 529 "grammar.y.pre"
		/* At this point, the current_type here is only a basic_type */
		/* and cannot be unused yet - Sym */
		
		if (current_type == TYPE_VOID)
		    yyerror("Illegal to declare class member of type void.");
		add_local_name(yyvsp[0].string, current_type | yyvsp[-1].type);
		scratch_free(yyvsp[0].string);
	    ;
    break;}
case 28:
#line 537 "grammar.y"
{
#line 548 "grammar.y.pre"
	      current_type = yyvsp[0].type;
	  ;
    break;}
case 30:
#line 546 "grammar.y"
{
#line 556 "grammar.y.pre"
		ident_hash_elem_t *ihe;

		ihe = find_or_add_ident(
			   PROG_STRING(yyval.number = store_prog_string(yyvsp[-1].string)),
			   FOA_GLOBAL_SCOPE);
		if (ihe->dn.class_num == -1) {
		    ihe->sem_value++;
		    ihe->dn.class_num = mem_block[A_CLASS_DEF].current_size / sizeof(class_def_t);
		    if (ihe->dn.class_num > CLASS_NUM_MASK){
			char buf[256];
			char *p;

			p = buf;
			sprintf(p, "Too many classes, max is %d.\n", CLASS_NUM_MASK + 1);
			yyerror(buf);
		    }

		    scratch_free(yyvsp[-1].string);
		    yyvsp[-2].ihe = 0;
		}
		else {
		    yyvsp[-2].ihe = ihe;
		}
	    ;
    break;}
case 31:
#line 573 "grammar.y"
{
#line 582 "grammar.y.pre"
		class_def_t *sd;
		class_member_entry_t *sme;
		int i, raise_error = 0;
		
		/* check for a redefinition */
		if (yyvsp[-5].ihe != 0) {
		    sd = CLASS(yyvsp[-5].ihe->dn.class_num);
		    if (sd->size != current_number_of_locals)
			raise_error = 1;
		    else {
			i = sd->size;
			sme = (class_member_entry_t *)mem_block[A_CLASS_MEMBER].block + sd->index;
			while (i--) {
			    /* check for matching names and types */
			    if (strcmp(PROG_STRING(sme[i].name), locals_ptr[i].ihe->name) != 0 ||
				sme[i].type != (type_of_locals_ptr[i] & ~LOCAL_MODS)) {
				raise_error = 1;
				break;
			    }
			}
		    }
		}

		if (raise_error) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;

		    p = strput(buf, end, "Illegal to redefine class ");
		    p = strput(p, end, PROG_STRING(yyval.number));
		    yyerror(buf);
		} else {
		    sd = (class_def_t *)allocate_in_mem_block(A_CLASS_DEF, sizeof(class_def_t));
		    i = sd->size = current_number_of_locals;
		    sd->index = mem_block[A_CLASS_MEMBER].current_size / sizeof(class_member_entry_t);
		    sd->name = yyvsp[-2].number;

		    sme = (class_member_entry_t *)allocate_in_mem_block(A_CLASS_MEMBER, sizeof(class_member_entry_t) * current_number_of_locals);

		    while (i--) {
			sme[i].name = store_prog_string(locals_ptr[i].ihe->name);
			sme[i].type = type_of_locals_ptr[i] & ~LOCAL_MODS;
		    }
		}

		free_all_local_names(0);
		yyval.node = 0;
	    ;
    break;}
case 33:
#line 628 "grammar.y"
{
#line 636 "grammar.y.pre"
		if (yyvsp[0].ihe->dn.local_num != -1) {
		    char buff[256];
		    char *end = EndOf(buff);
		    char *p;
		    
		    p = strput(buff, end, "Illegal to redeclare local name '");
		    p = strput(p, end, yyvsp[0].ihe->name);
		    p = strput(p, end, "'");
		    yyerror(buff);
		}
		yyval.string = scratch_copy(yyvsp[0].ihe->name);
	    ;
    break;}
case 35:
#line 647 "grammar.y"
{
#line 654 "grammar.y.pre"
		if (yyvsp[0].ihe->dn.class_num == -1) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Undefined class '");
		    p = strput(p, end, yyvsp[0].ihe->name);
		    p = strput(p, end, "'");
		    yyerror(buf);
		    yyval.type = TYPE_ANY;
		} else {
		    yyval.type = yyvsp[0].ihe->dn.class_num | TYPE_MOD_CLASS;
		}
	    ;
    break;}
case 36:
#line 664 "grammar.y"
{
#line 670 "grammar.y.pre"
		char buf[256];
		char *end = EndOf(buf);
		char *p;

		p = strput(buf, end, "Undefined class '");
		p = strput(p, end, yyvsp[0].string);
		p = strput(p, end, "'");
		yyerror(buf);
		yyval.type = TYPE_ANY;
	    ;
    break;}
case 38:
#line 681 "grammar.y"
{
#line 687 "grammar.y.pre"
		yyval.type = TYPE_ANY;
	    ;
    break;}
case 40:
#line 690 "grammar.y"
{
#line 697 "grammar.y.pre"
		yyval.type = yyvsp[-1].type | TYPE_MOD_ARRAY;
	    ;
    break;}
case 42:
#line 699 "grammar.y"
{
#line 707 "grammar.y.pre"
		yyval.type = yyvsp[-1].type | LOCAL_MOD_REF;
	    ;
    break;}
case 43:
#line 707 "grammar.y"
{
#line 715 "grammar.y.pre"
                yyval.number = yyvsp[-1].type | yyvsp[0].type;
		if (yyvsp[-1].type != TYPE_VOID)
		    add_local_name("", yyvsp[-1].type | yyvsp[0].type);
            ;
    break;}
case 44:
#line 714 "grammar.y"
{
#line 721 "grammar.y.pre"
		if (yyvsp[-2].type == TYPE_VOID)
		    yyerror("Illegal to declare argument of type void.");
                add_local_name(yyvsp[0].string, yyvsp[-2].type | yyvsp[-1].type);
		scratch_free(yyvsp[0].string);
                yyval.number = yyvsp[-2].type | yyvsp[-1].type;
	    ;
    break;}
case 45:
#line 723 "grammar.y"
{
#line 729 "grammar.y.pre"
		if (exact_types) {
		    yyerror("Missing type for argument");
		}
		add_local_name(yyvsp[0].string, TYPE_ANY);
		scratch_free(yyvsp[0].string);
		yyval.number = TYPE_ANY;
            ;
    break;}
case 46:
#line 736 "grammar.y"
{
#line 741 "grammar.y.pre"
		yyval.argument.num_arg = 0;
                yyval.argument.flags = 0;
	    ;
    break;}
case 48:
#line 743 "grammar.y"
{
#line 747 "grammar.y.pre"
		int x = type_of_locals_ptr[max_num_locals-1];
		int lt = x & ~LOCAL_MODS;
		
		yyval.argument = yyvsp[-1].argument;
		yyval.argument.flags |= ARG_IS_VARARGS;

		if (x & LOCAL_MOD_REF) {
		    yyerror("Variable to hold remainder of args may not be a reference");
		    x &= ~LOCAL_MOD_REF;
		}
		if (lt != TYPE_ANY && !(lt & TYPE_MOD_ARRAY))
		    yywarn("Variable to hold remainder of arguments should be an array.");
	    ;
    break;}
case 49:
#line 762 "grammar.y"
{
#line 765 "grammar.y.pre"
		if ((yyvsp[0].number & TYPE_MASK) == TYPE_VOID && !(yyvsp[0].number & TYPE_MOD_CLASS)) {
		    if (yyvsp[0].number & ~TYPE_MASK)
			yyerror("Illegal to declare argument of type void.");
		    yyval.argument.num_arg = 0;
		} else {
		    yyval.argument.num_arg = 1;
		}
                yyval.argument.flags = 0;
	    ;
    break;}
case 50:
#line 774 "grammar.y"
{
#line 776 "grammar.y.pre"
		if (!yyval.argument.num_arg)    /* first arg was void w/no name */
		    yyerror("argument of type void must be the only argument.");
		if ((yyvsp[0].number & TYPE_MASK) == TYPE_VOID && !(yyvsp[0].number & TYPE_MOD_CLASS))
		    yyerror("Illegal to declare argument of type void.");

                yyval.argument = yyvsp[-2].argument;
		yyval.argument.num_arg++;
	    ;
    break;}
case 51:
#line 788 "grammar.y"
{
#line 789 "grammar.y.pre"
		yyval.type = 0;
	    ;
    break;}
case 52:
#line 793 "grammar.y"
{
#line 793 "grammar.y.pre"
		int acc_mod;
		
		yyval.type = yyvsp[-1].type | yyvsp[0].type;
		
                acc_mod = (yyval.type & DECL_ACCESS) & ~global_modifiers;
		if (acc_mod & (acc_mod - 1)) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Multiple access modifiers (");
		    p = get_type_modifiers(p, end, yyval.type);
		    p = strput(p, end, ") ");
		    yyerror(buf);
		    yyval.type = DECL_PUBLIC;
		}
	    ;
    break;}
case 53:
#line 816 "grammar.y"
{
#line 819 "grammar.y.pre"
		yyval.type = (yyvsp[-1].type << 16) | yyvsp[0].type;
		current_type = yyval.type;
	    ;
    break;}
case 54:
#line 825 "grammar.y"
{
#line 827 "grammar.y.pre"
		yyval.type = yyvsp[-2].type | yyvsp[-1].type;
	    ;
    break;}
case 56:
#line 834 "grammar.y"
{
#line 835 "grammar.y.pre"
		yyval.type = TYPE_UNKNOWN;
	    ;
    break;}
case 59:
#line 847 "grammar.y"
{
#line 847 "grammar.y.pre"
		if (current_type & (FUNC_VARARGS << 16)){
		    yyerror("Illegal to declare varargs variable.");
		    current_type &= ~(FUNC_VARARGS << 16);
		}
		/* Now it is ok to merge the two
		 * remember that class_num and varargs was the reason for above
		 * Do the merging once only per row of decls
		 */

		if (current_type & 0xffff0000){
		    current_type = (current_type >> 16) | (current_type & 0xffff);
		}

		current_type |= global_modifiers;

		if (!(current_type & DECL_ACCESS)) current_type |= DECL_PUBLIC;

		if ((current_type & ~DECL_MODS) == TYPE_VOID)
		    yyerror("Illegal to declare global variable of type void.");

		define_new_variable(yyvsp[0].string, current_type | yyvsp[-1].type);
		scratch_free(yyvsp[0].string);
	    ;
    break;}
case 60:
#line 873 "grammar.y"
{
#line 872 "grammar.y.pre"
		parse_node_t *expr, *newnode;
		int type;

		if (current_type & (FUNC_VARARGS << 16)){
		    yyerror("Illegal to declare varargs variable.");
		    current_type &= ~(FUNC_VARARGS << 16);
		}
		
		if (current_type & 0xffff0000){
		    current_type = (current_type >> 16) | (current_type & 0xffff);
		}

		current_type |= global_modifiers;

		if (!(current_type & DECL_ACCESS)) current_type |= DECL_PUBLIC;

		if ((current_type & ~DECL_MODS) == TYPE_VOID)
		    yyerror("Illegal to declare global variable of type void.");

		if (yyvsp[-1].number != F_ASSIGN)
		    yyerror("Only '=' is legal in initializers.");

		/* ignore current_type == 0, which gets a missing type error
		   later anyway */
		if (current_type) {
		    type = (current_type | yyvsp[-3].type) & ~DECL_MODS;
		    if ((current_type & ~DECL_MODS) == TYPE_VOID)
			yyerror("Illegal to declare global variable of type void.");
		    if (!compatible_types(type, yyvsp[0].node->type)) {
			char buff[256];
			char *end = EndOf(buff);
			char *p;
			
			p = strput(buff, end, "Type mismatch ");
			p = get_two_types(p, end, type, yyvsp[0].node->type);
			p = strput(p, end, " when initializing ");
			p = strput(p, end, yyvsp[-2].string);
			yyerror(buff);
		    }
		}
		yyvsp[0].node = do_promotions(yyvsp[0].node, type);

		CREATE_BINARY_OP(expr, F_VOID_ASSIGN, 0, yyvsp[0].node, 0);
		CREATE_OPCODE_1(expr->r.expr, F_GLOBAL_LVALUE, 0,
				define_new_variable(yyvsp[-2].string, current_type | yyvsp[-3].type));
		newnode = comp_trees[TREE_INIT];
		CREATE_TWO_VALUES(comp_trees[TREE_INIT], 0,
				  newnode, expr);
		scratch_free(yyvsp[-2].string);
	    ;
    break;}
case 61:
#line 929 "grammar.y"
{
#line 927 "grammar.y.pre"
		if (yyvsp[-2].decl.node && yyvsp[-1].node) {
		    CREATE_STATEMENTS(yyval.decl.node, yyvsp[-2].decl.node, yyvsp[-1].node);
		} else yyval.decl.node = (yyvsp[-2].decl.node ? yyvsp[-2].decl.node : yyvsp[-1].node);
                yyval.decl.num = yyvsp[-2].decl.num;
            ;
    break;}
case 65:
#line 942 "grammar.y"
{
#line 939 "grammar.y.pre"
                yyval.decl.node = 0;
                yyval.decl.num = 0;
            ;
    break;}
case 66:
#line 948 "grammar.y"
{
#line 944 "grammar.y.pre"
		if (yyvsp[0].type == TYPE_VOID)
		    yyerror("Illegal to declare local variable of type void.");
                /* can't do this in basic_type b/c local_name_list contains
                 * expr0 which contains cast which contains basic_type
                 */
                current_type = yyvsp[0].type;
            ;
    break;}
case 67:
#line 958 "grammar.y"
{
#line 953 "grammar.y.pre"
                if (yyvsp[-4].decl.node && yyvsp[-1].decl.node) {
		    CREATE_STATEMENTS(yyval.decl.node, yyvsp[-4].decl.node, yyvsp[-1].decl.node);
                } else yyval.decl.node = (yyvsp[-4].decl.node ? yyvsp[-4].decl.node : yyvsp[-1].decl.node);
                yyval.decl.num = yyvsp[-4].decl.num + yyvsp[-1].decl.num;
            ;
    break;}
case 68:
#line 970 "grammar.y"
{
#line 964 "grammar.y.pre"
		if (current_type & LOCAL_MOD_REF) {
		    yyerror("Illegal to declare local variable as reference");
		    current_type &= ~LOCAL_MOD_REF;
		}
		add_local_name(yyvsp[0].string, current_type | yyvsp[-1].type | LOCAL_MOD_UNUSED);

		scratch_free(yyvsp[0].string);
		yyval.node = 0;
	    ;
    break;}
case 69:
#line 982 "grammar.y"
{
#line 975 "grammar.y.pre"
		int type = (current_type | yyvsp[-3].type) & ~DECL_MODS;

		if (current_type & LOCAL_MOD_REF) {
		    yyerror("Illegal to declare local variable as reference");
		    current_type &= ~LOCAL_MOD_REF;
		    type &= ~LOCAL_MOD_REF;
		}

		if (yyvsp[-1].number != F_ASSIGN)
		    yyerror("Only '=' is allowed in initializers.");
		if (!compatible_types(yyvsp[0].node->type, type)) {
		    char buff[256];
		    char *end = EndOf(buff);
		    char *p;
		    
		    p = strput(buff, end, "Type mismatch ");
		    p = get_two_types(p, end, type, yyvsp[0].node->type);
		    p = strput(p, end, " when initializing ");
		    p = strput(p, end, yyvsp[-2].string);

		    yyerror(buff);
		}
		
		yyvsp[0].node = do_promotions(yyvsp[0].node, type);

		CREATE_UNARY_OP_1(yyval.node, F_VOID_ASSIGN_LOCAL, 0, yyvsp[0].node,
				  add_local_name(yyvsp[-2].string, current_type | yyvsp[-3].type | LOCAL_MOD_UNUSED));
		scratch_free(yyvsp[-2].string);
	    ;
    break;}
case 70:
#line 1017 "grammar.y"
{
#line 1009 "grammar.y.pre"
		if (yyvsp[-2].type == TYPE_VOID)
		    yyerror("Illegal to declare local variable of type void.");

		yyval.number = add_local_name(yyvsp[0].string, yyvsp[-2].type | yyvsp[-1].type);
		scratch_free(yyvsp[0].string);
	    ;
    break;}
case 71:
#line 1029 "grammar.y"
{
#line 1020 "grammar.y.pre"
                int type = type_of_locals_ptr[yyvsp[-2].number];

		if (type & LOCAL_MOD_REF) {
		    yyerror("Illegal to declare local variable as reference");
		    type_of_locals_ptr[yyvsp[-2].number] &= ~LOCAL_MOD_REF;
		}
		type &= ~LOCAL_MODS;

		if (yyvsp[-1].number != F_ASSIGN)
		    yyerror("Only '=' is allowed in initializers.");
		if (!compatible_types(yyvsp[0].node->type, type)) {
		    char buff[256];
		    char *end = EndOf(buff);
		    char *p;
		    
		    p = strput(buff, end, "Type mismatch ");
		    p = get_two_types(p, end, type, yyvsp[0].node->type);
		    p = strput(p, end, " when initializing.");
		    yyerror(buff);
		}

		yyvsp[0].node = do_promotions(yyvsp[0].node, type);

		/* this is an expression */
		CREATE_BINARY_OP(yyval.node, F_ASSIGN, 0, yyvsp[0].node, 0);
                CREATE_OPCODE_1(yyval.node->r.expr, F_LOCAL_LVALUE, 0, yyvsp[-2].number);
	    ;
    break;}
case 72:
#line 1062 "grammar.y"
{
#line 1052 "grammar.y.pre"
                yyval.decl.node = yyvsp[0].node;
                yyval.decl.num = 1;
            ;
    break;}
case 73:
#line 1068 "grammar.y"
{
#line 1057 "grammar.y.pre"
                if (yyvsp[-2].node && yyvsp[0].decl.node) {
		    CREATE_STATEMENTS(yyval.decl.node, yyvsp[-2].node, yyvsp[0].decl.node);
                } else yyval.decl.node = (yyvsp[-2].node ? yyvsp[-2].node : yyvsp[0].decl.node);
                yyval.decl.num = 1 + yyvsp[0].decl.num;
            ;
    break;}
case 74:
#line 1079 "grammar.y"
{
#line 1067 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 75:
#line 1084 "grammar.y"
{
#line 1071 "grammar.y.pre"
		if (yyvsp[-1].node && yyvsp[0].node) {
		    CREATE_STATEMENTS(yyval.node, yyvsp[-1].node, yyvsp[0].node);
		} else yyval.node = (yyvsp[-1].node ? yyvsp[-1].node : yyvsp[0].node);
            ;
    break;}
case 76:
#line 1091 "grammar.y"
{
#line 1077 "grammar.y.pre"
		yyval.node = 0;
            ;
    break;}
case 77:
#line 1099 "grammar.y"
{
#line 1084 "grammar.y.pre"
		yyval.node = pop_value(yyvsp[-1].node);
#ifdef DEBUG
		{
		    parse_node_t *replacement;
		    CREATE_STATEMENTS(replacement, yyval.node, 0);
		    CREATE_OPCODE(replacement->r.expr, F_BREAK_POINT, 0);
		    yyval.node = replacement;
		}
#endif
	    ;
    break;}
case 83:
#line 1117 "grammar.y"
{
#line 1101 "grammar.y.pre"
                yyval.node = yyvsp[0].decl.node;
                pop_n_locals(yyvsp[0].decl.num);
            ;
    break;}
case 84:
#line 1123 "grammar.y"
{
#line 1106 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 85:
#line 1128 "grammar.y"
{
#line 1110 "grammar.y.pre"
		if (context & SPECIAL_CONTEXT) {
		    yyerror("Cannot break out of catch { } or time_expression { }");
		    yyval.node = 0;
		} else
		if (context & SWITCH_CONTEXT) {
		    CREATE_CONTROL_JUMP(yyval.node, CJ_BREAK_SWITCH);
		} else
		if (context & LOOP_CONTEXT) {
		    CREATE_CONTROL_JUMP(yyval.node, CJ_BREAK);
		    if (context & LOOP_FOREACH) {
			parse_node_t *replace;
			CREATE_STATEMENTS(replace, 0, yyval.node);
			CREATE_OPCODE(replace->l.expr, F_EXIT_FOREACH, 0);
			yyval.node = replace;
		    }
		} else {
		    yyerror("break statement outside loop");
		    yyval.node = 0;
		}
	    ;
    break;}
case 86:
#line 1151 "grammar.y"
{
#line 1132 "grammar.y.pre"
		if (context & SPECIAL_CONTEXT)
		    yyerror("Cannot continue out of catch { } or time_expression { }");
		else
		if (!(context & LOOP_CONTEXT))
		    yyerror("continue statement outside loop");
		CREATE_CONTROL_JUMP(yyval.node, CJ_CONTINUE);
	    ;
    break;}
case 87:
#line 1164 "grammar.y"
{
#line 1144 "grammar.y.pre"
		yyvsp[-3].number = context;
		context = LOOP_CONTEXT;
	    ;
    break;}
case 88:
#line 1170 "grammar.y"
{
#line 1149 "grammar.y.pre"
		CREATE_LOOP(yyval.node, 1, yyvsp[0].node, 0, optimize_loop_test(yyvsp[-3].node));
		context = yyvsp[-5].number;
	    ;
    break;}
case 89:
#line 1179 "grammar.y"
{
#line 1157 "grammar.y.pre"
		yyvsp[0].number = context;
		context = LOOP_CONTEXT;
	    ;
    break;}
case 90:
#line 1185 "grammar.y"
{
#line 1162 "grammar.y.pre"
		CREATE_LOOP(yyval.node, 0, yyvsp[-5].node, 0, optimize_loop_test(yyvsp[-2].node));
		context = yyvsp[-7].number;
	    ;
    break;}
case 91:
#line 1194 "grammar.y"
{
#line 1170 "grammar.y.pre"
		yyvsp[-5].decl.node = pop_value(yyvsp[-5].decl.node);
		yyvsp[-7].number = context;
		context = LOOP_CONTEXT;
	    ;
    break;}
case 92:
#line 1201 "grammar.y"
{
#line 1176 "grammar.y.pre"
		yyval.decl.num = yyvsp[-7].decl.num; /* number of declarations (0/1) */
		
		yyvsp[-3].node = pop_value(yyvsp[-3].node);
		if (yyvsp[-3].node && IS_NODE(yyvsp[-3].node, NODE_UNARY_OP, F_INC)
		    && IS_NODE(yyvsp[-3].node->r.expr, NODE_OPCODE_1, F_LOCAL_LVALUE)) {
		    int lvar = yyvsp[-3].node->r.expr->l.number;
		    CREATE_OPCODE_1(yyvsp[-3].node, F_LOOP_INCR, 0, lvar);
		}

		CREATE_STATEMENTS(yyval.decl.node, yyvsp[-7].decl.node, 0);
		CREATE_LOOP(yyval.decl.node->r.expr, 1, yyvsp[0].node, yyvsp[-3].node, optimize_loop_test(yyvsp[-5].node));

		context = yyvsp[-9].number;
	      ;
    break;}
case 93:
#line 1220 "grammar.y"
{
#line 1194 "grammar.y.pre"
		if (yyvsp[0].ihe->dn.local_num != -1) {
		    CREATE_OPCODE_1(yyval.decl.node, F_LOCAL_LVALUE, 0, yyvsp[0].ihe->dn.local_num);
		    type_of_locals_ptr[yyvsp[0].ihe->dn.local_num] &= ~LOCAL_MOD_UNUSED;
		} else
		if (yyvsp[0].ihe->dn.global_num != -1) {
		    CREATE_OPCODE_1(yyval.decl.node, F_GLOBAL_LVALUE, 0, yyvsp[0].ihe->dn.global_num);
		} else {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;

		    p = strput(buf, end, "'");
		    p = strput(p, end, yyvsp[0].ihe->name);
		    p = strput(p, end, "' is not a local or a global variable.");
		    yyerror(buf);
		    CREATE_OPCODE_1(yyval.decl.node, F_GLOBAL_LVALUE, 0, 0);
		}
		yyval.decl.num = 0;
	    ;
    break;}
case 94:
#line 1242 "grammar.y"
{
#line 1215 "grammar.y.pre"
		if (type_of_locals_ptr[yyvsp[0].number] & LOCAL_MOD_REF) {
		    CREATE_OPCODE_1(yyval.decl.node, F_REF_LVALUE, 0, yyvsp[0].number);
		} else {
		    CREATE_OPCODE_1(yyval.decl.node, F_LOCAL_LVALUE, 0, yyvsp[0].number);
		    type_of_locals_ptr[yyvsp[0].number] &= ~LOCAL_MOD_UNUSED;
		}
		yyval.decl.num = 1;
            ;
    break;}
case 95:
#line 1253 "grammar.y"
{
#line 1225 "grammar.y.pre"
		char buf[256];
		char *end = EndOf(buf);
		char *p;
		
		p = strput(buf, end, "'");
		p = strput(p, end, yyvsp[0].string);
		p = strput(p, end, "' is not a local or a global variable.");
		yyerror(buf);
		CREATE_OPCODE_1(yyval.decl.node, F_GLOBAL_LVALUE, 0, 0);
		scratch_free(yyvsp[0].string);
		yyval.decl.num = 0;
	    ;
    break;}
case 96:
#line 1271 "grammar.y"
{
#line 1242 "grammar.y.pre"
		CREATE_FOREACH(yyval.decl.node, yyvsp[0].decl.node, 0);
		yyval.decl.num = yyvsp[0].decl.num;
            ;
    break;}
case 97:
#line 1277 "grammar.y"
{
#line 1247 "grammar.y.pre"
		CREATE_FOREACH(yyval.decl.node, yyvsp[-2].decl.node, yyvsp[0].decl.node);
		yyval.decl.num = yyvsp[-2].decl.num + yyvsp[0].decl.num;
		if (yyvsp[-2].decl.node->v.number == F_REF_LVALUE)
		    yyerror("Mapping key may not be a reference in foreach()");
            ;
    break;}
case 98:
#line 1288 "grammar.y"
{
#line 1257 "grammar.y.pre"
		yyvsp[-3].decl.node->v.expr = yyvsp[-1].node;
		yyvsp[-5].number = context;
		context = LOOP_CONTEXT | LOOP_FOREACH;
            ;
    break;}
case 99:
#line 1295 "grammar.y"
{
#line 1263 "grammar.y.pre"
		yyval.decl.num = yyvsp[-5].decl.num;

		CREATE_STATEMENTS(yyval.decl.node, yyvsp[-5].decl.node, 0);
		CREATE_LOOP(yyval.decl.node->r.expr, 2, yyvsp[0].node, 0, 0);
		CREATE_OPCODE(yyval.decl.node->r.expr->r.expr, F_NEXT_FOREACH, 0);
		
		context = yyvsp[-7].number;
	    ;
    break;}
case 100:
#line 1309 "grammar.y"
{
#line 1276 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 102:
#line 1318 "grammar.y"
{
#line 1284 "grammar.y.pre"
	 	yyval.decl.node = yyvsp[0].node;
		yyval.decl.num = 0;
	    ;
    break;}
case 103:
#line 1324 "grammar.y"
{
#line 1289 "grammar.y.pre"
		yyval.decl.node = yyvsp[0].node;
		yyval.decl.num = 1;
	    ;
    break;}
case 104:
#line 1333 "grammar.y"
{
#line 1297 "grammar.y.pre"
                yyvsp[-3].number = context;
                context &= LOOP_CONTEXT;
                context |= SWITCH_CONTEXT;
                yyvsp[-2].number = mem_block[A_CASES].current_size;
            ;
    break;}
case 105:
#line 1341 "grammar.y"
{
#line 1304 "grammar.y.pre"
                parse_node_t *node1, *node2;

                if (yyvsp[-1].node) {
		    CREATE_STATEMENTS(node1, yyvsp[-2].node, yyvsp[-1].node);
                } else node1 = yyvsp[-2].node;

                if (context & SWITCH_STRINGS) {
                    NODE_NO_LINE(node2, NODE_SWITCH_STRINGS);
                } else if (context & SWITCH_RANGES) {
		    NODE_NO_LINE(node2, NODE_SWITCH_RANGES);
		} else {
                    NODE_NO_LINE(node2, NODE_SWITCH_NUMBERS);
                }

                node2->l.expr = yyvsp[-7].node;
                node2->r.expr = node1;
                prepare_cases(node2, yyvsp[-8].number);
                context = yyvsp[-9].number;
		yyval.node = node2;
		pop_n_locals(yyvsp[-3].decl.num);
            ;
    break;}
case 106:
#line 1368 "grammar.y"
{
#line 1330 "grammar.y.pre"
               if (yyvsp[0].node){
		   CREATE_STATEMENTS(yyval.node, yyvsp[-1].node, yyvsp[0].node);
               } else yyval.node = yyvsp[-1].node;
           ;
    break;}
case 107:
#line 1375 "grammar.y"
{
#line 1336 "grammar.y.pre"
               if (yyvsp[0].node){
		   CREATE_STATEMENTS(yyval.node, yyvsp[-1].node, yyvsp[0].node);
               } else yyval.node = yyvsp[-1].node;
           ;
    break;}
case 108:
#line 1382 "grammar.y"
{
#line 1342 "grammar.y.pre"
               yyval.node = 0;
           ;
    break;}
case 109:
#line 1391 "grammar.y"
{
#line 1350 "grammar.y.pre"
                yyval.node = yyvsp[-1].node;
                yyval.node->v.expr = 0;

                add_to_mem_block(A_CASES, (char *)&(yyvsp[-1].node), sizeof(yyvsp[-1].node));
            ;
    break;}
case 110:
#line 1399 "grammar.y"
{
#line 1357 "grammar.y.pre"
                if ( yyvsp[-3].node->kind != NODE_CASE_NUMBER
                    || yyvsp[-1].node->kind != NODE_CASE_NUMBER )
                    yyerror("String case labels not allowed as range bounds");
                if (yyvsp[-3].node->r.number > yyvsp[-1].node->r.number) break;

		context |= SWITCH_RANGES;

                yyval.node = yyvsp[-3].node;
                yyval.node->v.expr = yyvsp[-1].node;

                add_to_mem_block(A_CASES, (char *)&(yyvsp[-3].node), sizeof(yyvsp[-3].node));
            ;
    break;}
case 111:
#line 1414 "grammar.y"
{
#line 1371 "grammar.y.pre"
                if (context & SWITCH_DEFAULT) {
                    yyerror("Duplicate default");
                    yyval.node = 0;
                    break;
                }
		yyval.node = new_node();
		yyval.node->kind = NODE_DEFAULT;
                yyval.node->v.expr = 0;
                add_to_mem_block(A_CASES, (char *)&(yyval.node), sizeof(yyval.node));
                context |= SWITCH_DEFAULT;
            ;
    break;}
case 112:
#line 1431 "grammar.y"
{
#line 1387 "grammar.y.pre"
                if ((context & SWITCH_STRINGS) && yyvsp[0].pointer_int)
                    yyerror("Mixed case label list not allowed");

                if (yyvsp[0].pointer_int) context |= SWITCH_NUMBERS;

		yyval.node = new_node();
		yyval.node->kind = NODE_CASE_NUMBER;
                yyval.node->r.expr = (parse_node_t *)yyvsp[0].pointer_int;
            ;
    break;}
case 113:
#line 1443 "grammar.y"
{
#line 1398 "grammar.y.pre"
		int str;
		
		str = store_prog_string(yyvsp[0].string);
                scratch_free(yyvsp[0].string);
                if (context & SWITCH_NUMBERS)
                    yyerror("Mixed case label list not allowed");
                context |= SWITCH_STRINGS;
		yyval.node = new_node();
		yyval.node->kind = NODE_CASE_STRING;
                yyval.node->r.number = str;
            ;
    break;}
case 114:
#line 1460 "grammar.y"
{
#line 1414 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int | yyvsp[0].pointer_int;
            ;
    break;}
case 115:
#line 1465 "grammar.y"
{
#line 1418 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int ^ yyvsp[0].pointer_int;
            ;
    break;}
case 116:
#line 1470 "grammar.y"
{
#line 1422 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int & yyvsp[0].pointer_int;
            ;
    break;}
case 117:
#line 1475 "grammar.y"
{
#line 1426 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int == yyvsp[0].pointer_int;
            ;
    break;}
case 118:
#line 1480 "grammar.y"
{
#line 1430 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int != yyvsp[0].pointer_int;
            ;
    break;}
case 119:
#line 1485 "grammar.y"
{
#line 1434 "grammar.y.pre"
                switch(yyvsp[-1].number){
                    case F_GE: yyval.pointer_int = yyvsp[-2].pointer_int >= yyvsp[0].pointer_int; break;
                    case F_LE: yyval.pointer_int = yyvsp[-2].pointer_int <= yyvsp[0].pointer_int; break;
                    case F_GT: yyval.pointer_int = yyvsp[-2].pointer_int >  yyvsp[0].pointer_int; break;
                }
            ;
    break;}
case 120:
#line 1494 "grammar.y"
{
#line 1442 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int < yyvsp[0].pointer_int;
            ;
    break;}
case 121:
#line 1499 "grammar.y"
{
#line 1446 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int << yyvsp[0].pointer_int;
            ;
    break;}
case 122:
#line 1504 "grammar.y"
{
#line 1450 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int >> yyvsp[0].pointer_int;
            ;
    break;}
case 123:
#line 1509 "grammar.y"
{
#line 1454 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int + yyvsp[0].pointer_int;
            ;
    break;}
case 124:
#line 1514 "grammar.y"
{
#line 1458 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int - yyvsp[0].pointer_int;
            ;
    break;}
case 125:
#line 1519 "grammar.y"
{
#line 1462 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-2].pointer_int * yyvsp[0].pointer_int;
            ;
    break;}
case 126:
#line 1524 "grammar.y"
{
#line 1466 "grammar.y.pre"
                if (yyvsp[0].pointer_int) yyval.pointer_int = yyvsp[-2].pointer_int % yyvsp[0].pointer_int; else yyerror("Modulo by zero");
            ;
    break;}
case 127:
#line 1529 "grammar.y"
{
#line 1470 "grammar.y.pre"
                if (yyvsp[0].pointer_int) yyval.pointer_int = yyvsp[-2].pointer_int / yyvsp[0].pointer_int; else yyerror("Division by zero");
            ;
    break;}
case 128:
#line 1534 "grammar.y"
{
#line 1474 "grammar.y.pre"
                yyval.pointer_int = yyvsp[-1].pointer_int;
            ;
    break;}
case 129:
#line 1539 "grammar.y"
{
#line 1478 "grammar.y.pre"
		yyval.pointer_int = yyvsp[0].number;
	    ;
    break;}
case 130:
#line 1544 "grammar.y"
{
#line 1482 "grammar.y.pre"
                yyval.pointer_int = -yyvsp[0].number;
            ;
    break;}
case 131:
#line 1549 "grammar.y"
{
#line 1486 "grammar.y.pre"
                yyval.pointer_int = !yyvsp[0].number;
            ;
    break;}
case 132:
#line 1554 "grammar.y"
{
#line 1490 "grammar.y.pre"
                yyval.pointer_int = ~yyvsp[0].number;
            ;
    break;}
case 133:
#line 1562 "grammar.y"
{
#line 1497 "grammar.y.pre"
		yyval.node = yyvsp[0].node;
	    ;
    break;}
case 134:
#line 1567 "grammar.y"
{
#line 1501 "grammar.y.pre"
		CREATE_TWO_VALUES(yyval.node, yyvsp[0].node->type, pop_value(yyvsp[-2].node), yyvsp[0].node);
	    ;
    break;}
case 136:
#line 1579 "grammar.y"
{
#line 1518 "grammar.y.pre"
		int op;

		if (!(context & ARG_LIST))
		    yyerror("ref illegal outside function argument list");
		else
		    num_refs++;
		
		switch (yyvsp[0].node->kind) {
		case NODE_PARAMETER_LVALUE:
		    op = F_LOCAL_LVALUE;
		    break;
		case NODE_TERNARY_OP:
		case NODE_OPCODE_1:
		case NODE_UNARY_OP_1:
		case NODE_BINARY_OP:
		    op = yyvsp[0].node->v.number;
		    if (op > F_RINDEX_LVALUE) {
			yyerror("Illegal to make reference to range");
			break;
		    }
		}
		CREATE_UNARY_OP_1(yyval.node, F_MAKE_REF, TYPE_ANY, yyvsp[0].node, op);
	    ;
    break;}
case 137:
#line 1606 "grammar.y"
{
#line 1545 "grammar.y.pre"
	        parse_node_t *l = yyvsp[-2].node, *r = yyvsp[0].node;
		/* set this up here so we can change it below */
		/* assignments are backwards; rhs is evaluated before
		   lhs, so put the RIGHT hand side on the LEFT hand
		   side of the tree node. */
		CREATE_BINARY_OP(yyval.node, yyvsp[-1].number, r->type, r, l);

		if (exact_types && !compatible_types(r->type, l->type) &&
		    !(yyvsp[-1].number == F_ADD_EQ
		      && r->type == TYPE_STRING && 
		      COMP_TYPE(l->type, TYPE_NUMBER))) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Bad assignment ");
		    p = get_two_types(p, end, l->type, r->type);
		    p = strput(p, end, ".");
		    yyerror(buf);
		}
		
		if (yyvsp[-1].number == F_ASSIGN)
		    yyval.node->l.expr = do_promotions(r, l->type);
	    ;
    break;}
case 138:
#line 1633 "grammar.y"
{
#line 1571 "grammar.y.pre"
		yyerror("Illegal LHS");
		CREATE_ERROR(yyval.node);
	    ;
    break;}
case 139:
#line 1639 "grammar.y"
{
#line 1576 "grammar.y.pre"
		parse_node_t *p1 = yyvsp[-2].node, *p2 = yyvsp[0].node;

		if (exact_types && !compatible_types2(p1->type, p2->type)) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Types in ?: do not match ");
		    p = get_two_types(p, end, p1->type, p2->type);
		    p = strput(p, end, ".");
		    yywarn(buf);
		}

		/* optimize if last expression did F_NOT */
		if (IS_NODE(yyvsp[-4].node, NODE_UNARY_OP, F_NOT)) {
		    /* !a ? b : c  --> a ? c : b */
		    CREATE_IF(yyval.node, yyvsp[-4].node->r.expr, p2, p1);
		} else {
		    CREATE_IF(yyval.node, yyvsp[-4].node, p1, p2);
		}
		yyval.node->type = ((p1->type == p2->type) ? p1->type : TYPE_ANY);
	    ;
    break;}
case 140:
#line 1664 "grammar.y"
{
#line 1600 "grammar.y.pre"
		CREATE_LAND_LOR(yyval.node, F_LOR, yyvsp[-2].node, yyvsp[0].node);
		if (IS_NODE(yyvsp[-2].node, NODE_LAND_LOR, F_LOR))
		    yyvsp[-2].node->kind = NODE_BRANCH_LINK;
	    ;
    break;}
case 141:
#line 1671 "grammar.y"
{
#line 1606 "grammar.y.pre"
		CREATE_LAND_LOR(yyval.node, F_LAND, yyvsp[-2].node, yyvsp[0].node);
		if (IS_NODE(yyvsp[-2].node, NODE_LAND_LOR, F_LAND))
		    yyvsp[-2].node->kind = NODE_BRANCH_LINK;
	    ;
    break;}
case 142:
#line 1678 "grammar.y"
{
#line 1612 "grammar.y.pre"
		int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;
		
		if (is_boolean(yyvsp[-2].node) && is_boolean(yyvsp[0].node))
		    yywarn("bitwise operation on boolean values.");
		if ((t1 & TYPE_MOD_ARRAY) || (t3 & TYPE_MOD_ARRAY)) {
		    if (t1 != t3) {
			if ((t1 != TYPE_ANY) && (t3 != TYPE_ANY) &&
			    !(t1 & t3 & TYPE_MOD_ARRAY)) {
			    char buf[256];
			    char *end = EndOf(buf);
			    char *p;

			    p = strput(buf, end, "Incompatible types for | ");
			    p = get_two_types(p, end, t1, t3);
			    p = strput(p, end, ".");
			    yyerror(buf);
			}
			t1 = TYPE_ANY | TYPE_MOD_ARRAY;
		    }
		    CREATE_BINARY_OP(yyval.node, F_OR, t1, yyvsp[-2].node, yyvsp[0].node);
		}
		else yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_OR, "|");		
	    ;
    break;}
case 143:
#line 1704 "grammar.y"
{
#line 1637 "grammar.y.pre"
		yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_XOR, "^");
	    ;
    break;}
case 144:
#line 1709 "grammar.y"
{
#line 1641 "grammar.y.pre"
		int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;
		if (is_boolean(yyvsp[-2].node) && is_boolean(yyvsp[0].node))
		    yywarn("bitwise operation on boolean values.");
		if ((t1 & TYPE_MOD_ARRAY) || (t3 & TYPE_MOD_ARRAY)) {
		    if (t1 != t3) {
			if ((t1 != TYPE_ANY) && (t3 != TYPE_ANY) &&
			    !(t1 & t3 & TYPE_MOD_ARRAY)) {
			    char buf[256];
			    char *end = EndOf(buf);
			    char *p;
			    
			    p = strput(buf, end, "Incompatible types for & ");
			    p = get_two_types(p, end, t1, t3);
			    p = strput(p, end, ".");
			    yyerror(buf);
			}
			t1 = TYPE_ANY | TYPE_MOD_ARRAY;
		    } 
		    CREATE_BINARY_OP(yyval.node, F_AND, t1, yyvsp[-2].node, yyvsp[0].node);
		} else yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_AND, "&");
	    ;
    break;}
case 145:
#line 1733 "grammar.y"
{
#line 1664 "grammar.y.pre"
		if (exact_types && !compatible_types2(yyvsp[-2].node->type, yyvsp[0].node->type)){
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "== always false because of incompatible types ");
		    p = get_two_types(p, end, yyvsp[-2].node->type, yyvsp[0].node->type);
		    p = strput(p, end, ".");
		    yyerror(buf);
		}
		/* x == 0 -> !x */
		if (IS_NODE(yyvsp[-2].node, NODE_NUMBER, 0)) {
		    CREATE_UNARY_OP(yyval.node, F_NOT, TYPE_NUMBER, yyvsp[0].node);
		} else
		if (IS_NODE(yyvsp[0].node, NODE_NUMBER, 0)) {
		    CREATE_UNARY_OP(yyval.node, F_NOT, TYPE_NUMBER, yyvsp[-2].node);
		} else {
		    CREATE_BINARY_OP(yyval.node, F_EQ, TYPE_NUMBER, yyvsp[-2].node, yyvsp[0].node);
		}
	    ;
    break;}
case 146:
#line 1756 "grammar.y"
{
#line 1686 "grammar.y.pre"
		if (exact_types && !compatible_types2(yyvsp[-2].node->type, yyvsp[0].node->type)){
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;

		    p = strput(buf, end, "!= always true because of incompatible types ");
		    p = get_two_types(p, end, yyvsp[-2].node->type, yyvsp[0].node->type);
		    p = strput(p, end, ".");
		    yyerror(buf);
		}
                CREATE_BINARY_OP(yyval.node, F_NE, TYPE_NUMBER, yyvsp[-2].node, yyvsp[0].node);
	    ;
    break;}
case 147:
#line 1771 "grammar.y"
{
#line 1700 "grammar.y.pre"
		if (exact_types) {
		    int t1 = yyvsp[-2].node->type;
		    int t3 = yyvsp[0].node->type;

		    if (!COMP_TYPE(t1, TYPE_NUMBER) 
			&& !COMP_TYPE(t1, TYPE_STRING)) {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Bad left argument to '");
			p = strput(p, end, query_instr_name(yyvsp[-1].number));
			p = strput(p, end, "' : \"");
			p = get_type_name(p, end, t1);
			p = strput(p, end, "\"");
			yyerror(buf);
		    } else if (!COMP_TYPE(t3, TYPE_NUMBER) 
			       && !COMP_TYPE(t3, TYPE_STRING)) {
                        char buf[256];
			char *end = EndOf(buf);
			char *p;
			
                        p = strput(buf, end, "Bad right argument to '");
                        p = strput(p, end, query_instr_name(yyvsp[-1].number));
                        p = strput(p, end, "' : \"");
                        p = get_type_name(p, end, t3);
			p = strput(p, end, "\"");
			yyerror(buf);
		    } else if (!compatible_types2(t1,t3)) {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Arguments to ");
			p = strput(p, end, query_instr_name(yyvsp[-1].number));
			p = strput(p, end, " do not have compatible types : ");
			p = get_two_types(p, end, t1, t3);
			yyerror(buf);
		    }
		}
                CREATE_BINARY_OP(yyval.node, yyvsp[-1].number, TYPE_NUMBER, yyvsp[-2].node, yyvsp[0].node);
	    ;
    break;}
case 148:
#line 1816 "grammar.y"
{
#line 1744 "grammar.y.pre"
                if (exact_types) {
                    int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;

                    if (!COMP_TYPE(t1, TYPE_NUMBER) 
			&& !COMP_TYPE(t1, TYPE_STRING)) {
                        char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Bad left argument to '<' : \"");
                        p = get_type_name(p, end, t1);
			p = strput(p, end, "\"");
                        yyerror(buf);
                    } else if (!COMP_TYPE(t3, TYPE_NUMBER)
			       && !COMP_TYPE(t3, TYPE_STRING)) {
                        char buf[200];
			char *end = EndOf(buf);
			char *p;
			
                        p = strput(buf, end, "Bad right argument to '<' : \"");
                        p = get_type_name(p, end, t3);
                        p = strput(p, end, "\"");
                        yyerror(buf);
                    } else if (!compatible_types2(t1,t3)) {
                        char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Arguments to < do not have compatible types : ");
			p = get_two_types(p, end, t1, t3);
                        yyerror(buf);
                    }
                }
                CREATE_BINARY_OP(yyval.node, F_LT, TYPE_NUMBER, yyvsp[-2].node, yyvsp[0].node);
            ;
    break;}
case 149:
#line 1854 "grammar.y"
{
#line 1781 "grammar.y.pre"
		yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_LSH, "<<");
	    ;
    break;}
case 150:
#line 1859 "grammar.y"
{
#line 1785 "grammar.y.pre"
		yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_RSH, ">>");
	    ;
    break;}
case 151:
#line 1864 "grammar.y"
{
#line 1789 "grammar.y.pre"
		int result_type;

		if (exact_types) {
		    int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;

		    if (t1 == t3){
#ifdef CAST_CALL_OTHERS
			if (t1 == TYPE_UNKNOWN){
			    yyerror("Bad arguments to '+' (unknown vs unknown)");
			    result_type = TYPE_ANY;
			} else
#endif
			    result_type = t1;
		    }
		    else if (t1 == TYPE_ANY) {
			if (t3 == TYPE_FUNCTION) {
			    yyerror("Bad right argument to '+' (function)");
			    result_type = TYPE_ANY;
			} else result_type = t3;
		    } else if (t3 == TYPE_ANY) {
			if (t1 == TYPE_FUNCTION) {
			    yyerror("Bad left argument to '+' (function)");
			    result_type = TYPE_ANY;
			} else result_type = t1;
		    } else {
			switch(t1) {
			    case TYPE_STRING:
			    {
				if (t3 == TYPE_REAL || t3 == TYPE_NUMBER){
				    result_type = TYPE_STRING;
				} else goto add_error;
				break;
			    }
			    case TYPE_NUMBER:
			    {
				if (t3 == TYPE_REAL || t3 == TYPE_STRING)
				    result_type = t3;
				else goto add_error;
				break;
			    }
			case TYPE_REAL:
			    {
				if (t3 == TYPE_NUMBER) result_type = TYPE_REAL;
				else if (t3 == TYPE_STRING) result_type = TYPE_STRING;
				else goto add_error;
				break;
			    }
			    default:
			    {
				if (t1 & t3 & TYPE_MOD_ARRAY) {
				    result_type = TYPE_ANY|TYPE_MOD_ARRAY;
				    break;
				}
add_error:
				{
				    char buf[256];
				    char *end = EndOf(buf);
				    char *p;
				    
				    p = strput(buf, end, "Invalid argument types to '+' ");
				    p = get_two_types(p, end, t1, t3);
				    yyerror(buf);
				    result_type = TYPE_ANY;
				}
			    }
			}
		    }
		} else 
		    result_type = TYPE_ANY;

		/* TODO: perhaps we should do (string)+(number) and
		 * (number)+(string) constant folding as well.
		 *
		 * codefor string x = "foo" + 1;
		 *
		 * 0000: push string 13, number 1
		 * 0004: +
		 * 0005: (void)assign_local LV0
		 */
		switch (yyvsp[-2].node->kind) {
		case NODE_NUMBER:
		    /* 0 + X */
		    if (yyvsp[-2].node->v.number == 0 &&
			(yyvsp[0].node->type == TYPE_NUMBER || yyvsp[0].node->type == TYPE_REAL)) {
			yyval.node = yyvsp[0].node;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.number += yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[0].node;
			yyvsp[0].node->v.real += yyvsp[-2].node->v.number;
			break;
		    }
		    /* swapping the nodes may help later constant folding */
		    if (yyvsp[0].node->type != TYPE_STRING && yyvsp[0].node->type != TYPE_ANY)
			CREATE_BINARY_OP(yyval.node, F_ADD, result_type, yyvsp[0].node, yyvsp[-2].node);
		    else
			CREATE_BINARY_OP(yyval.node, F_ADD, result_type, yyvsp[-2].node, yyvsp[0].node);
		    break;
		case NODE_REAL:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real += yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real += yyvsp[0].node->v.real;
			break;
		    }
		    /* swapping the nodes may help later constant folding */
		    if (yyvsp[0].node->type != TYPE_STRING && yyvsp[0].node->type != TYPE_ANY)
			CREATE_BINARY_OP(yyval.node, F_ADD, result_type, yyvsp[0].node, yyvsp[-2].node);
		    else
			CREATE_BINARY_OP(yyval.node, F_ADD, result_type, yyvsp[-2].node, yyvsp[0].node);
		    break;
		case NODE_STRING:
		    if (yyvsp[0].node->kind == NODE_STRING) {
			/* Combine strings */
			int n1, n2;
			char *new, *s1, *s2;
			int l;

			n1 = yyvsp[-2].node->v.number;
			n2 = yyvsp[0].node->v.number;
			s1 = PROG_STRING(n1);
			s2 = PROG_STRING(n2);
			new = (char *)DXALLOC( (l = strlen(s1))+strlen(s2)+1, TAG_COMPILER, "combine string" );
			strcpy(new, s1);
			strcat(new + l, s2);
			/* free old strings (ordering may help shrink table) */
			if (n1 > n2) {
			    free_prog_string(n1); free_prog_string(n2);
			} else {
			    free_prog_string(n2); free_prog_string(n1);
			}
			yyval.node = yyvsp[-2].node;
			yyval.node->v.number = store_prog_string(new);
			FREE(new);
			break;
		    }
		    /* Yes, this can actually happen for absurd code like:
		     * (int)"foo" + 0
		     * for which I guess we ought to generate (int)"foo"
		     * in order to be consistent.  Then shoot the coder.
		     */
		    /* FALLTHROUGH */
		default:
		    /* X + 0 */
		    if (IS_NODE(yyvsp[0].node, NODE_NUMBER, 0) &&
			(yyvsp[-2].node->type == TYPE_NUMBER || yyvsp[-2].node->type == TYPE_REAL)) {
			yyval.node = yyvsp[-2].node;
			break;
		    }
		    CREATE_BINARY_OP(yyval.node, F_ADD, result_type, yyvsp[-2].node, yyvsp[0].node);
		    break;
		}
	    ;
    break;}
case 152:
#line 2029 "grammar.y"
{
#line 1953 "grammar.y.pre"
		int result_type;

		if (exact_types) {
		    int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;

		    if (t1 == t3){
			switch(t1){
			    case TYPE_ANY:
			    case TYPE_NUMBER:
			    case TYPE_REAL:
			        result_type = t1;
				break;
			    default:
				if (!(t1 & TYPE_MOD_ARRAY)){
				    type_error("Bad argument number 1 to '-'", t1);
				    result_type = TYPE_ANY;
				} else result_type = t1;
			}
		    } else if (t1 == TYPE_ANY){
			switch(t3){
			    case TYPE_REAL:
			    case TYPE_NUMBER:
			        result_type = t3;
				break;
			    default:
				if (!(t3 & TYPE_MOD_ARRAY)){
				    type_error("Bad argument number 2 to '-'", t3);
				    result_type = TYPE_ANY;
				} else result_type = t3;
			}
		    } else if (t3 == TYPE_ANY){
			switch(t1){
			    case TYPE_REAL:
			    case TYPE_NUMBER:
			        result_type = t1;
				break;
			    default:
				if (!(t1 & TYPE_MOD_ARRAY)){
				    type_error("Bad argument number 1 to '-'", t1);
				    result_type = TYPE_ANY;
				} else result_type = t1;
			}
		    } else if ((t1 == TYPE_REAL && t3 == TYPE_NUMBER) ||
			       (t3 == TYPE_REAL && t1 == TYPE_NUMBER)){
			result_type = TYPE_REAL;
		    } else if (t1 & t3 & TYPE_MOD_ARRAY){
			result_type = TYPE_MOD_ARRAY|TYPE_ANY;
		    } else {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Invalid types to '-' ");
			p = get_two_types(p, end, t1, t3);
			yyerror(buf);
			result_type = TYPE_ANY;
		    }
		} else result_type = TYPE_ANY;
		
		switch (yyvsp[-2].node->kind) {
		case NODE_NUMBER:
		    if (yyvsp[-2].node->v.number == 0) {
			CREATE_UNARY_OP(yyval.node, F_NEGATE, yyvsp[0].node->type, yyvsp[0].node);
		    } else if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.number -= yyvsp[0].node->v.number;
		    } else if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[0].node;
			yyvsp[0].node->v.real = yyvsp[-2].node->v.number - yyvsp[0].node->v.real;
		    } else {
			CREATE_BINARY_OP(yyval.node, F_SUBTRACT, result_type, yyvsp[-2].node, yyvsp[0].node);
		    }
		    break;
		case NODE_REAL:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real -= yyvsp[0].node->v.number;
		    } else if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real -= yyvsp[0].node->v.real;
		    } else {
			CREATE_BINARY_OP(yyval.node, F_SUBTRACT, result_type, yyvsp[-2].node, yyvsp[0].node);
		    }
		    break;
		default:
		    /* optimize X-0 */
		    if (IS_NODE(yyvsp[0].node, NODE_NUMBER, 0)) {
			yyval.node = yyvsp[-2].node;
		    } 
		    CREATE_BINARY_OP(yyval.node, F_SUBTRACT, result_type, yyvsp[-2].node, yyvsp[0].node);
		}
	    ;
    break;}
case 153:
#line 2124 "grammar.y"
{
#line 2047 "grammar.y.pre"
		int result_type;

		if (exact_types){
		    int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;

		    if (t1 == t3){
			switch(t1){
			    case TYPE_MAPPING:
			    case TYPE_ANY:
			    case TYPE_NUMBER:
			    case TYPE_REAL:
			        result_type = t1;
				break;
			default:
				type_error("Bad argument number 1 to '*'", t1);
				result_type = TYPE_ANY;
			}
		    } else if (t1 == TYPE_ANY || t3 == TYPE_ANY){
			int t = (t1 == TYPE_ANY) ? t3 : t1;
			switch(t){
			    case TYPE_NUMBER:
			    case TYPE_REAL:
			    case TYPE_MAPPING:
			        result_type = t;
				break;
			    default:
				type_error((t1 == TYPE_ANY) ?
					   "Bad argument number 2 to '*'" :
					   "Bad argument number 1 to '*'",
					   t);
				result_type = TYPE_ANY;
			}
		    } else if ((t1 == TYPE_NUMBER && t3 == TYPE_REAL) ||
			       (t1 == TYPE_REAL && t3 == TYPE_NUMBER)){
			result_type = TYPE_REAL;
		    } else {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Invalid types to '*' ");
			p = get_two_types(p, end, t1, t3);
			yyerror(buf);
			result_type = TYPE_ANY;
		    }
		} else result_type = TYPE_ANY;

		switch (yyvsp[-2].node->kind) {
		case NODE_NUMBER:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyval.node->v.number *= yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[0].node;
			yyvsp[0].node->v.real *= yyvsp[-2].node->v.number;
			break;
		    }
		    CREATE_BINARY_OP(yyval.node, F_MULTIPLY, result_type, yyvsp[0].node, yyvsp[-2].node);
		    break;
		case NODE_REAL:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real *= yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real *= yyvsp[0].node->v.real;
			break;
		    }
		    CREATE_BINARY_OP(yyval.node, F_MULTIPLY, result_type, yyvsp[0].node, yyvsp[-2].node);
		    break;
		default:
		    CREATE_BINARY_OP(yyval.node, F_MULTIPLY, result_type, yyvsp[-2].node, yyvsp[0].node);
		}
	    ;
    break;}
case 154:
#line 2205 "grammar.y"
{
#line 2127 "grammar.y.pre"
		yyval.node = binary_int_op(yyvsp[-2].node, yyvsp[0].node, F_MOD, "%");
	    ;
    break;}
case 155:
#line 2210 "grammar.y"
{
#line 2131 "grammar.y.pre"
		int result_type;

		if (exact_types){
		    int t1 = yyvsp[-2].node->type, t3 = yyvsp[0].node->type;

		    if (t1 == t3){
			switch(t1){
			    case TYPE_NUMBER:
			    case TYPE_REAL:
			case TYPE_ANY:
			        result_type = t1;
				break;
			    default:
				type_error("Bad argument 1 to '/'", t1);
				result_type = TYPE_ANY;
			}
		    } else if (t1 == TYPE_ANY || t3 == TYPE_ANY){
			int t = (t1 == TYPE_ANY) ? t3 : t1;
			if (t == TYPE_REAL || t == TYPE_NUMBER)
			    result_type = t; 
			else {
			    type_error(t1 == TYPE_ANY ?
				       "Bad argument 2 to '/'" :
				       "Bad argument 1 to '/'", t);
			    result_type = TYPE_ANY;
			}
		    } else if ((t1 == TYPE_NUMBER && t3 == TYPE_REAL) ||
			       (t1 == TYPE_REAL && t3 == TYPE_NUMBER)) {
			result_type = TYPE_REAL;
		    } else {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Invalid types to '/' ");
			p = get_two_types(p, end, t1, t3);
			yyerror(buf);
			result_type = TYPE_ANY;
		    }
		} else result_type = TYPE_ANY;		    

		/* constant expressions */
		switch (yyvsp[-2].node->kind) {
		case NODE_NUMBER:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			if (yyvsp[0].node->v.number == 0) {
			    yyerror("Divide by zero in constant");
			    yyval.node = yyvsp[-2].node;
			    break;
			}
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.number /= yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			if (yyvsp[0].node->v.real == 0.0) {
			    yyerror("Divide by zero in constant");
			    yyval.node = yyvsp[-2].node;
			    break;
			}
			yyval.node = yyvsp[0].node;
			yyvsp[0].node->v.real = (yyvsp[-2].node->v.number / yyvsp[0].node->v.real);
			break;
		    }
		    CREATE_BINARY_OP(yyval.node, F_DIVIDE, result_type, yyvsp[-2].node, yyvsp[0].node);
		    break;
		case NODE_REAL:
		    if (yyvsp[0].node->kind == NODE_NUMBER) {
			if (yyvsp[0].node->v.number == 0) {
			    yyerror("Divide by zero in constant");
			    yyval.node = yyvsp[-2].node;
			    break;
			}
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real /= yyvsp[0].node->v.number;
			break;
		    }
		    if (yyvsp[0].node->kind == NODE_REAL) {
			if (yyvsp[0].node->v.real == 0.0) {
			    yyerror("Divide by zero in constant");
			    yyval.node = yyvsp[-2].node;
			    break;
			}
			yyval.node = yyvsp[-2].node;
			yyvsp[-2].node->v.real /= yyvsp[0].node->v.real;
			break;
		    }
		    CREATE_BINARY_OP(yyval.node, F_DIVIDE, result_type, yyvsp[-2].node, yyvsp[0].node);
		    break;
		default:
		    CREATE_BINARY_OP(yyval.node, F_DIVIDE, result_type, yyvsp[-2].node, yyvsp[0].node);
		}
	    ;
    break;}
case 156:
#line 2306 "grammar.y"
{
#line 2226 "grammar.y.pre"
		yyval.node = yyvsp[0].node;
		yyval.node->type = yyvsp[-1].type;

		if (exact_types &&
		    yyvsp[0].node->type != yyvsp[-1].type &&
		    yyvsp[0].node->type != TYPE_ANY && 
		    yyvsp[0].node->type != TYPE_UNKNOWN &&
		    yyvsp[-1].type != TYPE_VOID) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Cannot cast ");
		    p = get_type_name(p, end, yyvsp[0].node->type);
		    p = strput(p, end, "to ");
		    p = get_type_name(p, end, yyvsp[-1].type);
		    yyerror(buf);
		}
	    ;
    break;}
case 157:
#line 2328 "grammar.y"
{
#line 2247 "grammar.y.pre"
		CREATE_UNARY_OP(yyval.node, F_PRE_INC, 0, yyvsp[0].node);
                if (exact_types){
                    switch(yyvsp[0].node->type){
                        case TYPE_NUMBER:
                        case TYPE_ANY:
                        case TYPE_REAL:
                        {
                            yyval.node->type = yyvsp[0].node->type;
                            break;
                        }

                        default:
                        {
                            yyval.node->type = TYPE_ANY;
                            type_error("Bad argument 1 to ++x", yyvsp[0].node->type);
                        }
                    }
                } else yyval.node->type = TYPE_ANY;
	    ;
    break;}
case 158:
#line 2350 "grammar.y"
{
#line 2268 "grammar.y.pre"
		CREATE_UNARY_OP(yyval.node, F_PRE_DEC, 0, yyvsp[0].node);
                if (exact_types){
                    switch(yyvsp[0].node->type){
                        case TYPE_NUMBER:
                        case TYPE_ANY:
                        case TYPE_REAL:
                        {
                            yyval.node->type = yyvsp[0].node->type;
                            break;
                        }

                        default:
                        {
                            yyval.node->type = TYPE_ANY;
                            type_error("Bad argument 1 to --x", yyvsp[0].node->type);
                        }
                    }
                } else yyval.node->type = TYPE_ANY;

	    ;
    break;}
case 159:
#line 2373 "grammar.y"
{
#line 2290 "grammar.y.pre"
		if (yyvsp[0].node->kind == NODE_NUMBER) {
		    yyval.node = yyvsp[0].node;
		    yyval.node->v.number = !(yyval.node->v.number);
		} else {
		    CREATE_UNARY_OP(yyval.node, F_NOT, TYPE_NUMBER, yyvsp[0].node);
		}
	    ;
    break;}
case 160:
#line 2383 "grammar.y"
{
#line 2299 "grammar.y.pre"
		if (exact_types && !IS_TYPE(yyvsp[0].node->type, TYPE_NUMBER))
		    type_error("Bad argument to ~", yyvsp[0].node->type);
		if (yyvsp[0].node->kind == NODE_NUMBER) {
		    yyval.node = yyvsp[0].node;
		    yyval.node->v.number = ~yyval.node->v.number;
		} else {
		    CREATE_UNARY_OP(yyval.node, F_COMPL, TYPE_NUMBER, yyvsp[0].node);
		}
	    ;
    break;}
case 161:
#line 2395 "grammar.y"
{
#line 2310 "grammar.y.pre"
		int result_type;
                if (exact_types){
		    int t = yyvsp[0].node->type;
		    if (!COMP_TYPE(t, TYPE_NUMBER)){
			type_error("Bad argument to unary '-'", t);
			result_type = TYPE_ANY;
		    } else result_type = t;
		} else result_type = TYPE_ANY;

		switch (yyvsp[0].node->kind) {
		case NODE_NUMBER:
		    yyval.node = yyvsp[0].node;
		    yyval.node->v.number = -yyval.node->v.number;
		    break;
		case NODE_REAL:
		    yyval.node = yyvsp[0].node;
		    yyval.node->v.real = -yyval.node->v.real;
		    break;
		default:
		    CREATE_UNARY_OP(yyval.node, F_NEGATE, result_type, yyvsp[0].node);
		}
	    ;
    break;}
case 162:
#line 2420 "grammar.y"
{
#line 2334 "grammar.y.pre"
		CREATE_UNARY_OP(yyval.node, F_POST_INC, 0, yyvsp[-1].node);
		yyval.node->v.number = F_POST_INC;
                if (exact_types){
                    switch(yyvsp[-1].node->type){
                        case TYPE_NUMBER:
		    case TYPE_ANY:
                        case TYPE_REAL:
                        {
                            yyval.node->type = yyvsp[-1].node->type;
                            break;
                        }

                        default:
                        {
                            yyval.node->type = TYPE_ANY;
                            type_error("Bad argument 1 to x++", yyvsp[-1].node->type);
                        }
                    }
                } else yyval.node->type = TYPE_ANY;
	    ;
    break;}
case 163:
#line 2443 "grammar.y"
{
#line 2356 "grammar.y.pre"
		CREATE_UNARY_OP(yyval.node, F_POST_DEC, 0, yyvsp[-1].node);
                if (exact_types){
                    switch(yyvsp[-1].node->type){
		    case TYPE_NUMBER:
		    case TYPE_ANY:
		    case TYPE_REAL:
		    {
			yyval.node->type = yyvsp[-1].node->type;
			break;
		    }

		    default:
		    {
			yyval.node->type = TYPE_ANY;
			type_error("Bad argument 1 to x--", yyvsp[-1].node->type);
		    }
                    }
                } else yyval.node->type = TYPE_ANY;
	    ;
    break;}
case 170:
#line 2474 "grammar.y"
{
#line 2386 "grammar.y.pre"
		if (exact_types && !IS_TYPE(exact_types, TYPE_VOID))
		    yywarn("Non-void functions must return a value.");
		CREATE_RETURN(yyval.node, 0);
	    ;
    break;}
case 171:
#line 2481 "grammar.y"
{
#line 2392 "grammar.y.pre"
		if (exact_types && !compatible_types(yyvsp[-1].node->type, exact_types)) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Type of returned value doesn't match function return type ");
		    p = get_two_types(p, end, yyvsp[-1].node->type, exact_types);
		    yyerror(buf);
		}
		if (IS_NODE(yyvsp[-1].node, NODE_NUMBER, 0)) {
		    CREATE_RETURN(yyval.node, 0);
		} else {
		    CREATE_RETURN(yyval.node, yyvsp[-1].node);
		}
	    ;
    break;}
case 172:
#line 2502 "grammar.y"
{
#line 2412 "grammar.y.pre"
		CREATE_EXPR_LIST(yyval.node, 0);
	    ;
    break;}
case 173:
#line 2507 "grammar.y"
{
#line 2416 "grammar.y.pre"
		CREATE_EXPR_LIST(yyval.node, yyvsp[0].node);
	    ;
    break;}
case 174:
#line 2512 "grammar.y"
{
#line 2420 "grammar.y.pre"
		CREATE_EXPR_LIST(yyval.node, yyvsp[-1].node);
	    ;
    break;}
case 175:
#line 2520 "grammar.y"
{
#line 2427 "grammar.y.pre"
		CREATE_EXPR_NODE(yyval.node, yyvsp[0].node, 0);
	    ;
    break;}
case 176:
#line 2525 "grammar.y"
{
#line 2431 "grammar.y.pre"
		CREATE_EXPR_NODE(yyval.node, yyvsp[-1].node, 1);
	    ;
    break;}
case 177:
#line 2533 "grammar.y"
{
#line 2438 "grammar.y.pre"
		yyvsp[0].node->kind = 1;

		yyval.node = yyvsp[0].node;
	    ;
    break;}
case 178:
#line 2540 "grammar.y"
{
#line 2444 "grammar.y.pre"
		yyvsp[0].node->kind = 0;

		yyval.node = yyvsp[-2].node;
		yyval.node->kind++;
		yyval.node->l.expr->r.expr = yyvsp[0].node;
		yyval.node->l.expr = yyvsp[0].node;
	    ;
    break;}
case 179:
#line 2553 "grammar.y"
{
#line 2456 "grammar.y.pre"
		/* this is a dummy node */
		CREATE_EXPR_LIST(yyval.node, 0);
	    ;
    break;}
case 180:
#line 2559 "grammar.y"
{
#line 2461 "grammar.y.pre"
		CREATE_EXPR_LIST(yyval.node, yyvsp[0].node);
	    ;
    break;}
case 181:
#line 2564 "grammar.y"
{
#line 2465 "grammar.y.pre"
		CREATE_EXPR_LIST(yyval.node, yyvsp[-1].node);
	    ;
    break;}
case 182:
#line 2572 "grammar.y"
{
#line 2472 "grammar.y.pre"
		yyval.node = new_node_no_line();
		yyval.node->kind = 2;
		yyval.node->v.expr = yyvsp[0].node;
		yyval.node->r.expr = 0;
		yyval.node->type = 0;
		/* we keep track of the end of the chain in the left nodes */
		yyval.node->l.expr = yyval.node;
            ;
    break;}
case 183:
#line 2583 "grammar.y"
{
#line 2482 "grammar.y.pre"
		parse_node_t *expr;

		expr = new_node_no_line();
		expr->kind = 0;
		expr->v.expr = yyvsp[0].node;
		expr->r.expr = 0;
		expr->type = 0;
		
		yyvsp[-2].node->l.expr->r.expr = expr;
		yyvsp[-2].node->l.expr = expr;
		yyvsp[-2].node->kind += 2;
		yyval.node = yyvsp[-2].node;
	    ;
    break;}
case 184:
#line 2602 "grammar.y"
{
#line 2500 "grammar.y.pre"
		CREATE_TWO_VALUES(yyval.node, 0, yyvsp[-2].node, yyvsp[0].node);
            ;
    break;}
case 185:
#line 2610 "grammar.y"
{
#line 2507 "grammar.y.pre"
#define LV_ILLEGAL 1
#define LV_RANGE 2
#define LV_INDEX 4
                /* Restrictive lvalues, but I think they make more sense :) */
                yyval.node = yyvsp[0].node;
                switch(yyval.node->kind) {
		default:
		    yyerror("Illegal lvalue");
		    break;
		case NODE_PARAMETER:
		    yyval.node->kind = NODE_PARAMETER_LVALUE;
		    break;
		case NODE_TERNARY_OP:
		    yyval.node->v.number = yyval.node->r.expr->v.number;
		case NODE_OPCODE_1:
		case NODE_UNARY_OP_1:
		case NODE_BINARY_OP:
		    if (yyval.node->v.number >= F_LOCAL && yyval.node->v.number <= F_MEMBER)
			yyval.node->v.number++; /* make it an lvalue */
		    else if (yyval.node->v.number >= F_INDEX 
			     && yyval.node->v.number <= F_RE_RANGE) {
                        parse_node_t *node = yyval.node;
                        int flag = 0;
                        do {
                            switch(node->kind) {
			    case NODE_PARAMETER:
				node->kind = NODE_PARAMETER_LVALUE;
				flag |= LV_ILLEGAL;
				break;
			    case NODE_TERNARY_OP:
				node->v.number = node->r.expr->v.number;
			    case NODE_OPCODE_1:
			    case NODE_UNARY_OP_1:
			    case NODE_BINARY_OP:
				if (node->v.number >= F_LOCAL 
				    && node->v.number <= F_MEMBER) {
				    node->v.number++;
				    flag |= LV_ILLEGAL;
				    break;
				} else if (node->v.number == F_INDEX ||
					 node->v.number == F_RINDEX) {
				    node->v.number++;
				    flag |= LV_INDEX;
				    break;
				} else if (node->v.number >= F_ADD_EQ
					   && node->v.number <= F_ASSIGN) {
				    if (!(flag & LV_INDEX)) {
					yyerror("Illegal lvalue, a possible lvalue is (x <assign> y)[a]");
				    }
				    if (node->r.expr->kind == NODE_BINARY_OP||
					node->r.expr->kind == NODE_TERNARY_OP){
					if (node->r.expr->v.number >= F_NN_RANGE_LVALUE && node->r.expr->v.number <= F_NR_RANGE_LVALUE)
					    yyerror("Illegal to have (x[a..b] <assign> y) to be the beginning of an lvalue");
				    }
				    flag = LV_ILLEGAL;
				    break;
				} else if (node->v.number >= F_NN_RANGE
					 && node->v.number <= F_RE_RANGE) {
				    if (flag & LV_RANGE) {
					yyerror("Can't do range lvalue of range lvalue.");
					flag |= LV_ILLEGAL;
					break;
				    }
                                    if (flag & LV_INDEX){
					yyerror("Can't do indexed lvalue of range lvalue.");
					flag |= LV_ILLEGAL;
					break;
				    }
				    if (node->v.number == F_NE_RANGE) {
					/* x[foo..] -> x[foo..<1] */
					parse_node_t *rchild = node->r.expr;
					node->kind = NODE_TERNARY_OP;
					CREATE_BINARY_OP(node->r.expr,
							 F_NR_RANGE_LVALUE,
							 0, 0, rchild);
					CREATE_NUMBER(node->r.expr->l.expr, 1);
				    } else if (node->v.number == F_RE_RANGE) {
					/* x[<foo..] -> x[<foo..<1] */
					parse_node_t *rchild = node->r.expr;
					node->kind = NODE_TERNARY_OP;
					CREATE_BINARY_OP(node->r.expr,
							 F_RR_RANGE_LVALUE,
							 0, 0, rchild);
					CREATE_NUMBER(node->r.expr->l.expr, 1);
				    } else
					node->r.expr->v.number++;
				    flag |= LV_RANGE;
				    node = node->r.expr->r.expr;
				    continue;
				}
			    default:
				yyerror("Illegal lvalue");
				flag = LV_ILLEGAL;
				break;
			    }   
                            if ((flag & LV_ILLEGAL) || !(node = node->r.expr)) break;
                        } while (1);
                        break;
		    } else 
			yyerror("Illegal lvalue");
		    break;
                }
            ;
    break;}
case 187:
#line 2719 "grammar.y"
{
#line 2615 "grammar.y.pre"
		yyval.number = (yyvsp[0].number << 8) | FP_EFUN;
	    ;
    break;}
case 189:
#line 2729 "grammar.y"
{
#line 2647 "grammar.y.pre"
              int i;
              if ((i = yyvsp[0].ihe->dn.local_num) != -1) {
		  type_of_locals_ptr[i] &= ~LOCAL_MOD_UNUSED;
		  if (type_of_locals_ptr[i] & LOCAL_MOD_REF)
		      CREATE_OPCODE_1(yyval.node, F_REF, type_of_locals_ptr[i] & ~LOCAL_MOD_REF,i & 0xff);
		  else
		      CREATE_OPCODE_1(yyval.node, F_LOCAL, type_of_locals_ptr[i], i & 0xff);
		  if (current_function_context)
		      current_function_context->num_locals++;
              } else
		  if ((i = yyvsp[0].ihe->dn.global_num) != -1) {
		      if (current_function_context)
			  current_function_context->bindable = FP_NOT_BINDABLE;
                          CREATE_OPCODE_1(yyval.node, F_GLOBAL,
				      VAR_TEMP(i)->type & ~DECL_MODS, i);
		      if (VAR_TEMP(i)->type & DECL_HIDDEN) {
			  char buf[256];
			  char *end = EndOf(buf);
			  char *p;

			  p = strput(buf, end, "Illegal to use private variable '");
			  p = strput(p, end, yyvsp[0].ihe->name);
			  p = strput(p, end, "'");
			  yyerror(buf);
		      }
		  } else {
		      char buf[256];
		      char *end = EndOf(buf);
		      char *p;
		      
		      p = strput(buf, end, "Undefined variable '");
		      p = strput(p, end, yyvsp[0].ihe->name);
		      p = strput(p, end, "'");
		      if (current_number_of_locals < CFG_MAX_LOCAL_VARIABLES) {
			  add_local_name(yyvsp[0].ihe->name, TYPE_ANY);
		      }
		      CREATE_ERROR(yyval.node);
		      yyerror(buf);
		  }
	    ;
    break;}
case 190:
#line 2772 "grammar.y"
{
#line 2689 "grammar.y.pre"
		char buf[256];
		char *end = EndOf(buf);
		char *p;
		
		p = strput(buf, end, "Undefined variable '");
		p = strput(p, end, yyvsp[0].string);
		p = strput(p, end, "'");
                if (current_number_of_locals < CFG_MAX_LOCAL_VARIABLES) {
                    add_local_name(yyvsp[0].string, TYPE_ANY);
                }
                CREATE_ERROR(yyval.node);
                yyerror(buf);
                scratch_free(yyvsp[0].string);
            ;
    break;}
case 191:
#line 2789 "grammar.y"
{
#line 2705 "grammar.y.pre"
		CREATE_PARAMETER(yyval.node, TYPE_ANY, yyvsp[0].number);
            ;
    break;}
case 192:
#line 2794 "grammar.y"
{
#line 2709 "grammar.y.pre"
		yyval.contextp = current_function_context;
		/* already flagged as an error */
		if (current_function_context)
		    current_function_context = current_function_context->parent;
            ;
    break;}
case 193:
#line 2802 "grammar.y"
{
#line 2716 "grammar.y.pre"
		parse_node_t *node;

		current_function_context = yyvsp[-2].contextp;

		if (!current_function_context || current_function_context->num_parameters == -2) {
		    /* This was illegal, and error'ed when the '$' token
		     * was returned.
		     */
		    CREATE_ERROR(yyval.node);
		} else {
		    CREATE_OPCODE_1(yyval.node, F_LOCAL, yyvsp[-1].node->type,
				    current_function_context->values_list->kind++);

		    node = new_node_no_line();
		    node->type = 0;
		    current_function_context->values_list->l.expr->r.expr = node;
		    current_function_context->values_list->l.expr = node;
		    node->r.expr = 0;
		    node->v.expr = yyvsp[-1].node;
		}
	    ;
    break;}
case 194:
#line 2826 "grammar.y"
{
#line 2739 "grammar.y.pre"
		if (yyvsp[-2].node->type == TYPE_ANY) {
		    int cmi;
		    unsigned char tp;
		    
		    if ((cmi = lookup_any_class_member(yyvsp[0].string, &tp)) != -1) {
			CREATE_UNARY_OP_1(yyval.node, F_MEMBER, tp, yyvsp[-2].node, 0);
			yyval.node->l.number = cmi;
		    } else {
			CREATE_ERROR(yyval.node);
		    }
		} else if (!IS_CLASS(yyvsp[-2].node->type)) {
		    yyerror("Left argument of -> is not a class");
		    CREATE_ERROR(yyval.node);
		} else {
		    CREATE_UNARY_OP_1(yyval.node, F_MEMBER, 0, yyvsp[-2].node, 0);
		    yyval.node->l.number = lookup_class_member(CLASS_IDX(yyvsp[-2].node->type),
						       yyvsp[0].string,
						       &(yyval.node->type));
		}
		    
		scratch_free(yyvsp[0].string);
            ;
    break;}
case 195:
#line 2851 "grammar.y"
{
#line 2763 "grammar.y.pre"
                if (yyvsp[-5].node->type != TYPE_MAPPING && 
		    yyvsp[-1].node->kind == NODE_NUMBER && yyvsp[-1].node->v.number < 0)
		    yywarn("A negative constant as the second element of arr[x..y] no longer means indexing from the end.  Use arr[x..<y]");
                yyval.node = make_range_node(F_NN_RANGE, yyvsp[-5].node, yyvsp[-3].node, yyvsp[-1].node);
            ;
    break;}
case 196:
#line 2859 "grammar.y"
{
#line 2772 "grammar.y.pre"
                yyval.node = make_range_node(F_RN_RANGE, yyvsp[-6].node, yyvsp[-3].node, yyvsp[-1].node);
            ;
    break;}
case 197:
#line 2864 "grammar.y"
{
#line 2776 "grammar.y.pre"
		if (yyvsp[-1].node->kind == NODE_NUMBER && yyvsp[-1].node->v.number <= 1)
		    yyval.node = make_range_node(F_RE_RANGE, yyvsp[-7].node, yyvsp[-4].node, 0);
		else
		    yyval.node = make_range_node(F_RR_RANGE, yyvsp[-7].node, yyvsp[-4].node, yyvsp[-1].node);
            ;
    break;}
case 198:
#line 2872 "grammar.y"
{
#line 2783 "grammar.y.pre"
		if (yyvsp[-1].node->kind == NODE_NUMBER && yyvsp[-1].node->v.number <= 1)
		    yyval.node = make_range_node(F_NE_RANGE, yyvsp[-6].node, yyvsp[-4].node, 0);
		else
		    yyval.node = make_range_node(F_NR_RANGE, yyvsp[-6].node, yyvsp[-4].node, yyvsp[-1].node);
            ;
    break;}
case 199:
#line 2880 "grammar.y"
{
#line 2790 "grammar.y.pre"
                yyval.node = make_range_node(F_NE_RANGE, yyvsp[-4].node, yyvsp[-2].node, 0);
            ;
    break;}
case 200:
#line 2885 "grammar.y"
{
#line 2794 "grammar.y.pre"
                yyval.node = make_range_node(F_RE_RANGE, yyvsp[-5].node, yyvsp[-2].node, 0);
            ;
    break;}
case 201:
#line 2890 "grammar.y"
{
#line 2798 "grammar.y.pre"
                if (IS_NODE(yyvsp[-4].node, NODE_CALL, F_AGGREGATE)
		    && yyvsp[-1].node->kind == NODE_NUMBER) {
                    int i = yyvsp[-1].node->v.number;
                    if (i < 1 || i > yyvsp[-4].node->l.number)
                        yyerror("Illegal index to array constant.");
                    else {
                        parse_node_t *node = yyvsp[-4].node->r.expr;
                        i = yyvsp[-4].node->l.number - i;
                        while (i--)
                            node = node->r.expr;
                        yyval.node = node->v.expr;
                        break;
                    }
                }
		CREATE_BINARY_OP(yyval.node, F_RINDEX, 0, yyvsp[-1].node, yyvsp[-4].node);
                if (exact_types) {
		    switch(yyvsp[-4].node->type) {
		    case TYPE_MAPPING:
			yyerror("Illegal index for mapping.");
		    case TYPE_ANY:
			yyval.node->type = TYPE_ANY;
			break;
		    case TYPE_STRING:
		    case TYPE_BUFFER:
			yyval.node->type = TYPE_NUMBER;
			if (!IS_TYPE(yyvsp[-1].node->type,TYPE_NUMBER))
			    type_error("Bad type of index", yyvsp[-1].node->type);
			break;
			
		    default:
			if (yyvsp[-4].node->type & TYPE_MOD_ARRAY) {
			    yyval.node->type = yyvsp[-4].node->type & ~TYPE_MOD_ARRAY;
			    if (!IS_TYPE(yyvsp[-1].node->type,TYPE_NUMBER))
				type_error("Bad type of index", yyvsp[-1].node->type);
			} else {
			    type_error("Value indexed has a bad type ", yyvsp[-4].node->type);
			    yyval.node->type = TYPE_ANY;
			}
		    }
		} else yyval.node->type = TYPE_ANY;
            ;
    break;}
case 202:
#line 2934 "grammar.y"
{
#line 2841 "grammar.y.pre"
		/* Something stupid like ({ 1, 2, 3 })[1]; we take the
		 * time to optimize this because people who don't understand
		 * the preprocessor often write things like:
		 *
		 * #define MY_ARRAY ({ "foo", "bar", "bazz" })
		 * ...
		 * ... MY_ARRAY[1] ...
		 *
		 * which of course expands to the above.
		 */
                if (IS_NODE(yyvsp[-3].node, NODE_CALL, F_AGGREGATE) && yyvsp[-1].node->kind == NODE_NUMBER) {
                    int i = yyvsp[-1].node->v.number;
                    if (i < 0 || i >= yyvsp[-3].node->l.number)
                        yyerror("Illegal index to array constant.");
                    else {
                        parse_node_t *node = yyvsp[-3].node->r.expr;
                        while (i--)
                            node = node->r.expr;
                        yyval.node = node->v.expr;
                        break;
                    }
                }
                if (yyvsp[-1].node->kind == NODE_NUMBER && yyvsp[-1].node->v.number < 0)
		    yywarn("A negative constant in arr[x] no longer means indexing from the end.  Use arr[<x]");
                CREATE_BINARY_OP(yyval.node, F_INDEX, 0, yyvsp[-1].node, yyvsp[-3].node);
                if (exact_types) {
		    switch(yyvsp[-3].node->type) {
		    case TYPE_MAPPING:
		    case TYPE_ANY:
			yyval.node->type = TYPE_ANY;
			break;
		    case TYPE_STRING:
		    case TYPE_BUFFER:
			yyval.node->type = TYPE_NUMBER;
			if (!IS_TYPE(yyvsp[-1].node->type,TYPE_NUMBER))
			    type_error("Bad type of index", yyvsp[-1].node->type);
			break;
			
		    default:
			if (yyvsp[-3].node->type & TYPE_MOD_ARRAY) {
			    yyval.node->type = yyvsp[-3].node->type & ~TYPE_MOD_ARRAY;
			    if (!IS_TYPE(yyvsp[-1].node->type,TYPE_NUMBER))
				type_error("Bad type of index", yyvsp[-1].node->type);
			} else {
			    type_error("Value indexed has a bad type ", yyvsp[-3].node->type);
			    yyval.node->type = TYPE_ANY;
			}
                    }
                } else yyval.node->type = TYPE_ANY;
            ;
    break;}
case 204:
#line 2988 "grammar.y"
{
#line 2896 "grammar.y.pre"
		yyval.node = yyvsp[-1].node;
	    ;
    break;}
case 206:
#line 2994 "grammar.y"
{
#line 2904 "grammar.y.pre"
	        if (yyvsp[0].type != TYPE_FUNCTION) yyerror("Reserved type name unexpected.");
		yyval.func_block.num_local = current_number_of_locals;
		yyval.func_block.max_num_locals = max_num_locals;
		yyval.func_block.context = context;
		yyval.func_block.save_current_type = current_type;
		yyval.func_block.save_exact_types = exact_types;
	        if (type_of_locals_ptr + max_num_locals + CFG_MAX_LOCAL_VARIABLES >= &type_of_locals[type_of_locals_size])
		    reallocate_locals();
		deactivate_current_locals();
		locals_ptr += current_number_of_locals;
		type_of_locals_ptr += max_num_locals;
		max_num_locals = current_number_of_locals = 0;
		push_function_context();
		current_function_context->num_parameters = -1;
		exact_types = TYPE_ANY;
		context = 0;
            ;
    break;}
case 207:
#line 3014 "grammar.y"
{
#line 2923 "grammar.y.pre"
		if (yyvsp[-2].argument.flags & ARG_IS_VARARGS) {
		    yyerror("Anonymous varargs functions aren't implemented");
		}
		if (!yyvsp[0].decl.node) {
		    CREATE_RETURN(yyvsp[0].decl.node, 0);
		} else if (yyvsp[0].decl.node->kind != NODE_RETURN &&
			   (yyvsp[0].decl.node->kind != NODE_TWO_VALUES || yyvsp[0].decl.node->r.expr->kind != NODE_RETURN)) {
		    parse_node_t *replacement;
		    CREATE_STATEMENTS(replacement, yyvsp[0].decl.node, 0);
		    CREATE_RETURN(replacement->r.expr, 0);
		    yyvsp[0].decl.node = replacement;
		}
		
		yyval.node = new_node();
		yyval.node->kind = NODE_ANON_FUNC;
		yyval.node->type = TYPE_FUNCTION;
		yyval.node->l.number = (max_num_locals - yyvsp[-2].argument.num_arg);
		yyval.node->r.expr = yyvsp[0].decl.node;
		yyval.node->v.number = yyvsp[-2].argument.num_arg;
		if (current_function_context->bindable)
		    yyval.node->v.number |= 0x10000;
		free_all_local_names(1);
		
		current_number_of_locals = yyvsp[-4].func_block.num_local;
		max_num_locals = yyvsp[-4].func_block.max_num_locals;
		context = yyvsp[-4].func_block.context;
		current_type = yyvsp[-4].func_block.save_current_type;
		exact_types = yyvsp[-4].func_block.save_exact_types;
		pop_function_context();
		
		locals_ptr -= current_number_of_locals;
		type_of_locals_ptr -= max_num_locals;
		reactivate_current_locals();
	    ;
    break;}
case 208:
#line 3051 "grammar.y"
{
#line 2963 "grammar.y.pre"
		yyval.node = new_node();
		yyval.node->kind = NODE_FUNCTION_CONSTRUCTOR;
		yyval.node->type = TYPE_FUNCTION;
		yyval.node->r.expr = 0;
		switch (yyvsp[-2].number & 0xff) {
		case FP_L_VAR:
		    yyerror("Illegal to use local variable in a functional.");
		    CREATE_NUMBER(yyval.node->l.expr, 0);
		    yyval.node->l.expr->r.expr = 0;
		    yyval.node->l.expr->l.expr = 0;
		    yyval.node->v.number = FP_FUNCTIONAL;
		    break;
		case FP_G_VAR:
		    CREATE_OPCODE_1(yyval.node->l.expr, F_GLOBAL, 0, yyvsp[-2].number >> 8);
		    yyval.node->v.number = FP_FUNCTIONAL | FP_NOT_BINDABLE;
		    if (VAR_TEMP(yyval.node->l.expr->l.number)->type & DECL_HIDDEN) {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			
			p = strput(buf, end, "Illegal to use private variable '");
			p = strput(p, end, VAR_TEMP(yyval.node->l.expr->l.number)->name);
			p = strput(p, end, "'");
			yyerror(buf);
		    }
		    break;
		default:
		    yyval.node->v.number = yyvsp[-2].number;
		    break;
		}
	    ;
    break;}
case 209:
#line 3085 "grammar.y"
{
#line 2996 "grammar.y.pre"
		yyval.node = new_node();
		yyval.node->kind = NODE_FUNCTION_CONSTRUCTOR;
		yyval.node->type = TYPE_FUNCTION;
		yyval.node->v.number = yyvsp[-4].number;
		yyval.node->r.expr = yyvsp[-2].node;
		
		switch (yyvsp[-4].number & 0xff) {
		case FP_EFUN: {
		    int *argp;
		    int f = yyvsp[-4].number >>8;
		    int num = yyvsp[-2].node->kind;
		    int max_arg = predefs[f].max_args;
		    
		    if (num > max_arg && max_arg != -1) {
			parse_node_t *pn = yyvsp[-2].node;
			
			while (pn) {
			    if (pn->type & 1) break;
			    pn = pn->r.expr;
			}
			
			if (!pn) {
			    char bff[256];
			    char *end = EndOf(bff);
			    char *p;
			    
			    p = strput(bff, end, "Too many arguments to ");
			    p = strput(p, end, predefs[f].word);
			    yyerror(bff);
			}
		    } else if (max_arg != -1 && exact_types) {
			/*
			 * Now check all types of arguments to efuns.
			 */
			int i, argn, tmp;
			parse_node_t *enode = yyvsp[-2].node;
			argp = &efun_arg_types[predefs[f].arg_index];
			
			for (argn = 0; argn < num; argn++) {
			    if (enode->type & 1) break;
			    
			    tmp = enode->v.expr->type;
			    for (i=0; !compatible_types(tmp, argp[i])
				 && argp[i] != 0; i++)
				;
			    if (argp[i] == 0) {
				char buf[256];
				char *end = EndOf(buf);
				char *p;

				p = strput(buf, end, "Bad argument ");
				p = strput_int(p, end, argn+1);
				p = strput(p, end, " to efun ");
				p = strput(p, end, predefs[f].word);
				p = strput(p, end, "()");
				yyerror(buf);
			    } else {
				/* this little section necessary b/c in the
				   case float | int we dont want to do
				   promoting. */
				if (tmp == TYPE_NUMBER && argp[i] == TYPE_REAL) {
				    for (i++; argp[i] && argp[i] != TYPE_NUMBER; i++)
					;
				    if (!argp[i])
					enode->v.expr = promote_to_float(enode->v.expr);
				}
				if (tmp == TYPE_REAL && argp[i] == TYPE_NUMBER) {
				    for (i++; argp[i] && argp[i] != TYPE_REAL; i++)
					;
				    if (!argp[i])
					enode->v.expr = promote_to_int(enode->v.expr);
				}
			    }
			    while (argp[i] != 0)
				i++;
			    argp += i + 1;
			    enode = enode->r.expr;
			}
		    }
		    break;
		}
		case FP_L_VAR:
		case FP_G_VAR:
		    yyerror("Can't give parameters to functional.");
		    break;
		}
	    ;
    break;}
case 210:
#line 3175 "grammar.y"
{
#line 3085 "grammar.y.pre"
		 if (current_function_context->num_locals)
		     yyerror("Illegal to use local variable in functional.");
		 if (current_function_context->values_list->r.expr)
		     current_function_context->values_list->r.expr->kind = current_function_context->values_list->kind;
		 
		 yyval.node = new_node();
		 yyval.node->kind = NODE_FUNCTION_CONSTRUCTOR;
		 yyval.node->type = TYPE_FUNCTION;
		 yyval.node->l.expr = yyvsp[-2].node;
		 if (yyvsp[-2].node->kind == NODE_STRING)
		     yywarn("Function pointer returning string constant is NOT a function call");
		 yyval.node->r.expr = current_function_context->values_list->r.expr;
		 yyval.node->v.number = FP_FUNCTIONAL + current_function_context->bindable
		     + (current_function_context->num_parameters << 8);
		 pop_function_context();
             ;
    break;}
case 211:
#line 3194 "grammar.y"
{
#line 3103 "grammar.y.pre"
		CREATE_CALL(yyval.node, F_AGGREGATE_ASSOC, TYPE_MAPPING, yyvsp[-2].node);
	    ;
    break;}
case 212:
#line 3199 "grammar.y"
{
#line 3107 "grammar.y.pre"
		CREATE_CALL(yyval.node, F_AGGREGATE, TYPE_ANY | TYPE_MOD_ARRAY, yyvsp[-2].node);
	    ;
    break;}
case 213:
#line 3207 "grammar.y"
{
#line 3114 "grammar.y.pre"
		yyval.node = yyvsp[0].decl.node;
	    ;
    break;}
case 214:
#line 3212 "grammar.y"
{
#line 3118 "grammar.y.pre"
		yyval.node = insert_pop_value(yyvsp[-1].node);
	    ;
    break;}
case 215:
#line 3220 "grammar.y"
{
#line 3125 "grammar.y.pre"
		yyval.number = context;
		context = SPECIAL_CONTEXT;
	    ;
    break;}
case 216:
#line 3226 "grammar.y"
{
#line 3130 "grammar.y.pre"
		CREATE_CATCH(yyval.node, yyvsp[0].node);
		context = yyvsp[-1].number;
	    ;
    break;}
case 217:
#line 3236 "grammar.y"
{
#line 3154 "grammar.y.pre"
		int p = yyvsp[-1].node->v.number;
		CREATE_LVALUE_EFUN(yyval.node, TYPE_NUMBER, yyvsp[-1].node);
		CREATE_BINARY_OP_1(yyval.node->l.expr, F_SSCANF, 0, yyvsp[-4].node, yyvsp[-2].node, p);
	    ;
    break;}
case 218:
#line 3246 "grammar.y"
{
#line 3163 "grammar.y.pre"
		int p = yyvsp[-1].node->v.number;
		CREATE_LVALUE_EFUN(yyval.node, TYPE_NUMBER, yyvsp[-1].node);
		CREATE_TERNARY_OP_1(yyval.node->l.expr, F_PARSE_COMMAND, 0, 
				    yyvsp[-6].node, yyvsp[-4].node, yyvsp[-2].node, p);
	    ;
    break;}
case 219:
#line 3257 "grammar.y"
{
#line 3173 "grammar.y.pre"
		yyval.number = context;
		context = SPECIAL_CONTEXT;
	    ;
    break;}
case 220:
#line 3263 "grammar.y"
{
#line 3178 "grammar.y.pre"
		CREATE_TIME_EXPRESSION(yyval.node, yyvsp[0].node);
		context = yyvsp[-1].number;
	    ;
    break;}
case 221:
#line 3272 "grammar.y"
{
#line 3186 "grammar.y.pre"
	        yyval.node = new_node_no_line();
		yyval.node->r.expr = 0;
	        yyval.node->v.number = 0;
	    ;
    break;}
case 222:
#line 3279 "grammar.y"
{
#line 3192 "grammar.y.pre"
		parse_node_t *insert;
		
		yyval.node = yyvsp[0].node;
		insert = new_node_no_line();
		insert->r.expr = yyvsp[0].node->r.expr;
		insert->l.expr = yyvsp[-1].node;
		yyvsp[0].node->r.expr = insert;
		yyval.node->v.number++;
	    ;
    break;}
case 223:
#line 3294 "grammar.y"
{
#line 3206 "grammar.y.pre"
		CREATE_STRING(yyval.node, yyvsp[0].string);
		scratch_free(yyvsp[0].string);
	    ;
    break;}
case 225:
#line 3304 "grammar.y"
{
#line 3215 "grammar.y.pre"
		yyval.string = yyvsp[-1].string;
	    ;
    break;}
case 226:
#line 3309 "grammar.y"
{
#line 3219 "grammar.y.pre"
		yyval.string = scratch_join(yyvsp[-2].string, yyvsp[0].string);
	    ;
    break;}
case 228:
#line 3318 "grammar.y"
{
#line 3227 "grammar.y.pre"
		yyval.string = scratch_join(yyvsp[-1].string, yyvsp[0].string);
	    ;
    break;}
case 229:
#line 3325 "grammar.y"
{
#line 3233 "grammar.y.pre"
	yyval.node = new_node();
	yyval.node->l.expr = (parse_node_t *)yyvsp[-2].string;
	yyval.node->v.expr = yyvsp[0].node;
	yyval.node->r.expr = 0;
    ;
    break;}
case 230:
#line 3336 "grammar.y"
{
#line 3243 "grammar.y.pre"
	yyval.node = 0;
    ;
    break;}
case 231:
#line 3341 "grammar.y"
{
#line 3247 "grammar.y.pre"
	yyval.node = yyvsp[0].node;
	yyval.node->r.expr = yyvsp[-2].node;
    ;
    break;}
case 232:
#line 3351 "grammar.y"
{
#line 3256 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST; 
	    ;
    break;}
case 233:
#line 3358 "grammar.y"
{
#line 3262 "grammar.y.pre"
		context = yyvsp[-2].number;
		yyval.node = validate_efun_call(yyvsp[-4].number,yyvsp[-1].node);
		yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
		num_refs = yyvsp[-3].number;
	    ;
    break;}
case 234:
#line 3366 "grammar.y"
{
#line 3269 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST;
	    ;
    break;}
case 235:
#line 3373 "grammar.y"
{
#line 3275 "grammar.y.pre"
		context = yyvsp[-2].number;
		yyval.node = validate_efun_call(new_efun, yyvsp[-1].node);
		yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
		num_refs = yyvsp[-3].number;
            ;
    break;}
case 236:
#line 3381 "grammar.y"
{
#line 3282 "grammar.y.pre"
		parse_node_t *node;
		
		if (yyvsp[-2].ihe->dn.class_num == -1) {
		    char buf[256];
		    char *end = EndOf(buf);
		    char *p;
		    
		    p = strput(buf, end, "Undefined class '");
		    p = strput(p, end, yyvsp[-2].ihe->name);
		    p = strput(p, end, "'");
		    yyerror(buf);
		    CREATE_ERROR(yyval.node);
		    node = yyvsp[-1].node;
		    while (node) {
			scratch_free((char *)node->l.expr);
			node = node->r.expr;
		    }
		} else {
		    int type = yyvsp[-2].ihe->dn.class_num | TYPE_MOD_CLASS;
		    
		    if ((node = yyvsp[-1].node)) {
			CREATE_TWO_VALUES(yyval.node, type, 0, 0);
			yyval.node->l.expr = reorder_class_values(yyvsp[-2].ihe->dn.class_num,
							node);
			CREATE_OPCODE_1(yyval.node->r.expr, F_NEW_CLASS,
					type, yyvsp[-2].ihe->dn.class_num);
			
		    } else {
			CREATE_OPCODE_1(yyval.node, F_NEW_EMPTY_CLASS,
					type, yyvsp[-2].ihe->dn.class_num);
		    }
		}
            ;
    break;}
case 237:
#line 3417 "grammar.y"
{
#line 3317 "grammar.y.pre"
		parse_node_t *node;
		char buf[256];
		char *end = EndOf(buf);
		char *p;

		p = strput(buf, end, "Undefined class '");
		p = strput(p, end, yyvsp[-2].string);
		p = strput(p, end, "'");
		yyerror(buf);
		CREATE_ERROR(yyval.node);
		node = yyvsp[-1].node;
		while (node) {
		    scratch_free((char *)node->l.expr);
		    node = node->r.expr;
		}
	    ;
    break;}
case 238:
#line 3436 "grammar.y"
{
#line 3335 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST;
	    ;
    break;}
case 239:
#line 3443 "grammar.y"
{
#line 3341 "grammar.y.pre"
		int f;
		
		context = yyvsp[-2].number;
		yyval.node = yyvsp[-1].node;
		if ((f = yyvsp[-4].ihe->dn.function_num) != -1) {
		    if (current_function_context)
			current_function_context->bindable = FP_NOT_BINDABLE;
		    
		    yyval.node->kind = NODE_CALL_1;
		    yyval.node->v.number = F_CALL_FUNCTION_BY_ADDRESS;
		    yyval.node->l.number = f;
		    yyval.node->type = validate_function_call(f, yyvsp[-1].node->r.expr);
		} else if ((f=yyvsp[-4].ihe->dn.simul_num) != -1) {
		    yyval.node->kind = NODE_CALL_1;
		    yyval.node->v.number = F_SIMUL_EFUN;
		    yyval.node->l.number = f;
		    yyval.node->type = (SIMUL(f)->type) & ~DECL_MODS;
		} else if ((f=yyvsp[-4].ihe->dn.efun_num) != -1) {
		    yyval.node = validate_efun_call(f, yyvsp[-1].node);
		} else {
		    /* This here is a really nasty case that only occurs with
		     * exact_types off.  The user has done something gross like:
		     *
		     * func() { int f; f(); } // if f was prototyped we wouldn't
		     * f() { }                // need this case
		     *
		     * Don't complain, just grok it.
		     */
		    int f;
		    
		    if (current_function_context)
			current_function_context->bindable = FP_NOT_BINDABLE;
		    
		    f = define_new_function(yyvsp[-4].ihe->name, 0, 0, 
					    DECL_PUBLIC|FUNC_UNDEFINED, TYPE_ANY);
		    yyval.node->kind = NODE_CALL_1;
		    yyval.node->v.number = F_CALL_FUNCTION_BY_ADDRESS;
		    yyval.node->l.number = f;
		    yyval.node->type = TYPE_ANY; /* just a guess */
		    if (exact_types) {
			char buf[256];
			char *end = EndOf(buf);
			char *p;
			char *n = yyvsp[-4].ihe->name;
			if (*n == ':') n++;
			/* prevent some errors; by making it look like an
			 * inherited function we prevent redeclaration errors
			 * if it shows up later
			 */
			
			FUNCTION_FLAGS(f) &= ~FUNC_UNDEFINED;
			FUNCTION_FLAGS(f) |= (FUNC_INHERITED | FUNC_VARARGS);
			p = strput(buf, end, "Undefined function ");
			p = strput(p, end, n);
			yyerror(buf);
		    }
		}
		yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
		num_refs = yyvsp[-3].number;
	    ;
    break;}
case 240:
#line 3506 "grammar.y"
{
#line 3403 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST;
	    ;
    break;}
case 241:
#line 3513 "grammar.y"
{
#line 3409 "grammar.y.pre"
	      char *name = yyvsp[-4].string;

	      context = yyvsp[-2].number;
	      yyval.node = yyvsp[-1].node;
	      
	      if (current_function_context)
		  current_function_context->bindable = FP_NOT_BINDABLE;

	      if (*name == ':') {
		  int f;
		  
		  if ((f = arrange_call_inherited(name + 1, yyval.node)) != -1)
		      /* Can't do this; f may not be the correct function
			 entry.  It might be overloaded.
			 
		      validate_function_call(f, $$->r.expr)
		      */
		      ;
	      } else {
		  int f;
		  ident_hash_elem_t *ihe;
		  
		  f = (ihe = lookup_ident(name)) ? ihe->dn.function_num : -1;
		  yyval.node->kind = NODE_CALL_1;
		  yyval.node->v.number = F_CALL_FUNCTION_BY_ADDRESS;
		  if (f!=-1) {
		      /* The only way this can happen is if function_name
		       * below made the function name.  The lexer would
		       * return L_DEFINED_NAME instead.
		       */
		      yyval.node->type = validate_function_call(f, yyvsp[-1].node->r.expr);
		  } else {
		      f = define_new_function(name, 0, 0, 
					      DECL_PUBLIC|FUNC_UNDEFINED, TYPE_ANY);
		  }
		  yyval.node->l.number = f;
		  /*
		   * Check if this function has been defined.
		   * But, don't complain yet about functions defined
		   * by inheritance.
		   */
		  if (exact_types && (FUNCTION_FLAGS(f) & FUNC_UNDEFINED)) {
		      char buf[256];
		      char *end = EndOf(buf);
		      char *p;
		      char *n = yyvsp[-4].string;
		      if (*n == ':') n++;
		      /* prevent some errors */
		      FUNCTION_FLAGS(f) &= ~FUNC_UNDEFINED;
		      FUNCTION_FLAGS(f) |= (FUNC_INHERITED | FUNC_VARARGS);
		      p = strput(buf, end, "Undefined function ");
		      p = strput(p, end, n);
		      yyerror(buf);
		  }
		  if (!(FUNCTION_FLAGS(f) & FUNC_UNDEFINED))
		      yyval.node->type = FUNCTION_DEF(f)->type;
		  else
		      yyval.node->type = TYPE_ANY;  /* Just a guess */
	      }
	      yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
	      num_refs = yyvsp[-3].number;
	      scratch_free(name);
	  ;
    break;}
case 242:
#line 3579 "grammar.y"
{
#line 3474 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST;
	    ;
    break;}
case 243:
#line 3586 "grammar.y"
{
#line 3480 "grammar.y.pre"
		ident_hash_elem_t *ihe;
		int f;
		parse_node_t *pn1, *pn2;
		
		yyvsp[-1].node->v.number += 2;

		pn1 = new_node_no_line();
		pn1->type = 0;
		pn1->v.expr = yyvsp[-6].node;
		pn1->kind = yyvsp[-1].node->v.number;
		
		pn2 = new_node_no_line();
		pn2->type = 0;
		CREATE_STRING(pn2->v.expr, yyvsp[-4].string);
		scratch_free(yyvsp[-4].string);
		
		/* insert the two nodes */
		pn2->r.expr = yyvsp[-1].node->r.expr;
		pn1->r.expr = pn2;
		yyvsp[-1].node->r.expr = pn1;
		
		if (!yyvsp[-1].node->l.expr) yyvsp[-1].node->l.expr = pn2;
		    
		context = yyvsp[-2].number;
		ihe = lookup_ident("call_other");

		if ((f = ihe->dn.simul_num) != -1) {
		    yyval.node = yyvsp[-1].node;
		    yyval.node->kind = NODE_CALL_1;
		    yyval.node->v.number = F_SIMUL_EFUN;
		    yyval.node->l.number = f;
		    yyval.node->type = (SIMUL(f)->type) & ~DECL_MODS;
		} else {
		    yyval.node = validate_efun_call(arrow_efun, yyvsp[-1].node);
#ifdef CAST_CALL_OTHERS
		    yyval.node->type = TYPE_UNKNOWN;
#else
		    yyval.node->type = TYPE_ANY;
#endif		  
		}
		yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
		num_refs = yyvsp[-3].number;
	    ;
    break;}
case 244:
#line 3632 "grammar.y"
{
#line 3525 "grammar.y.pre"
		yyval.number = context;
		yyvsp[0].number = num_refs;
		context |= ARG_LIST;
	    ;
    break;}
case 245:
#line 3639 "grammar.y"
{
#line 3531 "grammar.y.pre"
	        parse_node_t *expr;

		context = yyvsp[-2].number;
		yyval.node = yyvsp[-1].node;
		yyval.node->kind = NODE_EFUN;
		yyval.node->l.number = yyval.node->v.number + 1;
		yyval.node->v.number = predefs[evaluate_efun].token;
#ifdef CAST_CALL_OTHERS
		yyval.node->type = TYPE_UNKNOWN;
#else
		yyval.node->type = TYPE_ANY;
#endif
		expr = new_node_no_line();
		expr->type = 0;
		expr->v.expr = yyvsp[-5].node;
		expr->r.expr = yyval.node->r.expr;
		yyval.node->r.expr = expr;
		yyval.node = check_refs(num_refs - yyvsp[-3].number, yyvsp[-1].node, yyval.node);
		num_refs = yyvsp[-3].number;
	    ;
    break;}
case 246:
#line 3663 "grammar.y"
{
#line 3554 "grammar.y.pre"
	svalue_t *res;
	ident_hash_elem_t *ihe;

	yyval.number = (ihe = lookup_ident(yyvsp[0].string)) ? ihe->dn.efun_num : -1;
	if (yyval.number == -1) {
	    char buf[256];
	    char *end = EndOf(buf);
	    char *p;
	    
	    p = strput(buf, end, "Unknown efun: ");
	    p = strput(p, end, yyvsp[0].string);
	    yyerror(buf);
	} else {
	    push_malloced_string(the_file_name(current_file));
	    share_and_push_string(yyvsp[0].string);
	    push_malloced_string(add_slash(main_file_name()));
	    res = safe_apply_master_ob(APPLY_VALID_OVERRIDE, 3);
	    if (!MASTER_APPROVED(res)) {
		yyerror("Invalid simulated efunction override");
		yyval.number = -1;
	    }
	}
	scratch_free(yyvsp[0].string);
      ;
    break;}
case 247:
#line 3689 "grammar.y"
{
#line 3579 "grammar.y.pre"
	svalue_t *res;
	
	push_malloced_string(the_file_name(current_file));
	push_constant_string("new");
	push_malloced_string(add_slash(main_file_name()));
	res = safe_apply_master_ob(APPLY_VALID_OVERRIDE, 3);
	if (!MASTER_APPROVED(res)) {
	    yyerror("Invalid simulated efunction override");
	    yyval.number = -1;
	} else yyval.number = new_efun;
      ;
    break;}
case 249:
#line 3707 "grammar.y"
{
#line 3596 "grammar.y.pre"
		int l = strlen(yyvsp[0].string) + 1;
		char *p;
		/* here we be a bit cute.  we put a : on the front so we
		 * don't have to strchr for it.  Here we do:
		 * "name" -> ":::name"
		 */
		yyval.string = scratch_realloc(yyvsp[0].string, l + 3);
		p = yyval.string + l;
		while (p--,l--)
		    *(p+3) = *p;
		strncpy(yyval.string, ":::", 3);
	    ;
    break;}
case 250:
#line 3722 "grammar.y"
{
#line 3610 "grammar.y.pre"
		int z, l = strlen(yyvsp[0].string) + 1;
		char *p;
		/* <type> and "name" -> ":type::name" */
		z = strlen(compiler_type_names[yyvsp[-2].type]) + 3; /* length of :type:: */
		yyval.string = scratch_realloc(yyvsp[0].string, l + z);
		p = yyval.string + l;
		while (p--,l--)
		    *(p+z) = *p;
		yyval.string[0] = ':';
		strncpy(yyval.string + 1, compiler_type_names[yyvsp[-2].type], z - 3);
		yyval.string[z-2] = ':';
		yyval.string[z-1] = ':';
	    ;
    break;}
case 251:
#line 3738 "grammar.y"
{
#line 3625 "grammar.y.pre"
		int l = strlen(yyvsp[-2].string);
		/* "ob" and "name" -> ":ob::name" */
		yyval.string = scratch_alloc(l + strlen(yyvsp[0].string) + 4);
		*(yyval.string) = ':';
		strcpy(yyval.string + 1, yyvsp[-2].string);
		strcpy(yyval.string + l + 1, "::");
		strcpy(yyval.string + l + 3, yyvsp[0].string);
		scratch_free(yyvsp[-2].string);
		scratch_free(yyvsp[0].string);
	    ;
    break;}
case 252:
#line 3754 "grammar.y"
{
#line 3640 "grammar.y.pre"
		/* x != 0 -> x */
		if (IS_NODE(yyvsp[-3].node, NODE_BINARY_OP, F_NE)) {
		    if (IS_NODE(yyvsp[-3].node->r.expr, NODE_NUMBER, 0))
			yyvsp[-3].node = yyvsp[-3].node->l.expr;
		    else if (IS_NODE(yyvsp[-3].node->l.expr, NODE_NUMBER, 0))
			     yyvsp[-3].node = yyvsp[-3].node->r.expr;
		}

		/* TODO: should optimize if (0), if (1) here.  
		 * Also generalize this.
		 */

		if (yyvsp[-1].node == 0) {
		    if (yyvsp[0].node == 0) {
			/* if (x) ; -> x; */
			yyval.node = pop_value(yyvsp[-3].node);
			break;
		    } else {
			/* if (x) {} else y; -> if (!x) y; */
			parse_node_t *repl;
			
			CREATE_UNARY_OP(repl, F_NOT, TYPE_NUMBER, yyvsp[-3].node);
			yyvsp[-3].node = repl;
			yyvsp[-1].node = yyvsp[0].node;
			yyvsp[0].node = 0;
		    }
		}
		CREATE_IF(yyval.node, yyvsp[-3].node, yyvsp[-1].node, yyvsp[0].node);
	    ;
    break;}
case 253:
#line 3789 "grammar.y"
{
#line 3674 "grammar.y.pre"
		yyval.node = 0;
	    ;
    break;}
case 254:
#line 3794 "grammar.y"
{
#line 3678 "grammar.y.pre"
		yyval.node = yyvsp[0].node;
            ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 487 "bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 3799 "grammar.y"



#line 3683 "grammar.y.pre"
